[Speculators][Speculative Decoding] Add Qwen Eagle3 Support (#21835)
Signed-off-by: Dipika Sikka <dipikasikka1@gmail.com>
This commit is contained in:
+12
-3
@@ -3175,10 +3175,19 @@ class SpeculativeConfig:
|
||||
"speculative decoding is > 1, but got "
|
||||
f"{self.disable_by_batch_size=}")
|
||||
|
||||
if self.method == "eagle3" and self.target_model_config and \
|
||||
"llama" not in self.target_model_config.hf_text_config.model_type:
|
||||
from vllm.transformers_utils.configs import SpeculatorsConfig
|
||||
|
||||
eagle3_target_supported = ["llama"]
|
||||
if self.draft_model_config and isinstance(
|
||||
self.draft_model_config.hf_config, SpeculatorsConfig):
|
||||
eagle3_target_supported.append("qwen")
|
||||
|
||||
if self.method == "eagle3" and self.target_model_config and not any(
|
||||
supported_model in
|
||||
self.target_model_config.hf_text_config.model_type
|
||||
for supported_model in eagle3_target_supported):
|
||||
raise ValueError(
|
||||
"Eagle3 is only supported for Llama models. "
|
||||
f"Eagle3 is only supported for {eagle3_target_supported} models. " # noqa: E501
|
||||
f"Got {self.target_model_config.hf_text_config.model_type=}")
|
||||
|
||||
return self
|
||||
|
||||
Reference in New Issue
Block a user