[Config] add "qwen" as a native eagle3 target supported model (#22333)

Signed-off-by: lechen <lecself@163.com>
Signed-off-by: LeChen <lecself@163.com>
This commit is contained in:
Le Chen
2025-08-09 20:21:05 -07:00
committed by GitHub
parent 0c5254b82a
commit 3d7363e61c
5 changed files with 30 additions and 27 deletions
+3 -2
View File
@@ -45,6 +45,7 @@ class EAGLEConfig(PretrainedConfig):
# Eagle model name should follow naming convention of
# LlamaForCausalLM -> EagleLlamaForCausalLM
# LlamaForCausalLM -> Eagle3LlamaForCausalLM / LlamaForCausalLMEagle3
if method == "eagle":
assert self.model is not None, \
"model should not be None when method is eagle"
@@ -56,8 +57,8 @@ class EAGLEConfig(PretrainedConfig):
assert self.model is not None, \
"model should not be None when method is eagle3"
kwargs["architectures"] = [
f"Eagle3{arch}" if not arch.startswith("Eagle3") \
else arch for arch in self.model.architectures
arch if arch.startswith("Eagle3") or arch.endswith("Eagle3")
else f"Eagle3{arch}" for arch in self.model.architectures
]
else:
raise ValueError(f"Invalid method {method}. \