[V1][Spec Decode][Bugfix] Load quantize weights for EAGLE (#18290)

This commit is contained in:
Ekagra Ranjan
2025-05-22 18:17:33 -04:00
committed by GitHub
parent 7b9d832c80
commit a04720bc36
2 changed files with 9 additions and 3 deletions

View File

@@ -52,13 +52,15 @@ class EAGLEConfig(PretrainedConfig):
assert self.model is not None, \
"model should not be None when method is eagle"
kwargs["architectures"] = [
f"Eagle{arch}" for arch in self.model.architectures
f"Eagle{arch}" if not arch.startswith("Eagle") \
else arch for arch in self.model.architectures
]
elif method == "eagle3":
assert self.model is not None, \
"model should not be None when method is eagle3"
kwargs["architectures"] = [
f"Eagle3{arch}" for arch in self.model.architectures
f"Eagle3{arch}" if not arch.startswith("Eagle3") \
else arch for arch in self.model.architectures
]
else:
raise ValueError(f"Invalid method {method}. \