Support DSpark configs with architectures=DSparkDraftModel + model_type=qwen3 (#52197)
Signed-off-by: mgoin <mgoin64@gmail.com>
This commit is contained in:
@@ -953,6 +953,10 @@ class SpeculativeConfig:
|
|||||||
"dspark" in self.draft_model_config.model.lower()
|
"dspark" in self.draft_model_config.model.lower()
|
||||||
or "Qwen3DSparkModel" in self.draft_model_config.architectures
|
or "Qwen3DSparkModel" in self.draft_model_config.architectures
|
||||||
or "Gemma4DSparkModel" in self.draft_model_config.architectures
|
or "Gemma4DSparkModel" in self.draft_model_config.architectures
|
||||||
|
or (
|
||||||
|
"DSparkDraftModel" in self.draft_model_config.architectures
|
||||||
|
and self.draft_model_config.hf_config.model_type == "qwen3"
|
||||||
|
)
|
||||||
):
|
):
|
||||||
self.method = "dspark"
|
self.method = "dspark"
|
||||||
elif self.draft_model_config.hf_config.model_type == "medusa":
|
elif self.draft_model_config.hf_config.model_type == "medusa":
|
||||||
@@ -1010,7 +1014,16 @@ class SpeculativeConfig:
|
|||||||
self.draft_model_config.hf_config = eagle_config
|
self.draft_model_config.hf_config = eagle_config
|
||||||
self.update_arch_()
|
self.update_arch_()
|
||||||
|
|
||||||
if self.method == "dspark" and (
|
if (
|
||||||
|
self.method == "dspark"
|
||||||
|
and "DSparkDraftModel" in self.draft_model_config.architectures
|
||||||
|
and self.draft_model_config.hf_config.model_type == "qwen3"
|
||||||
|
):
|
||||||
|
self.draft_model_config.hf_config.architectures = [
|
||||||
|
"Qwen3DSparkModel"
|
||||||
|
]
|
||||||
|
self.update_arch_()
|
||||||
|
elif self.method == "dspark" and (
|
||||||
"Qwen3DSparkModel" not in self.draft_model_config.architectures
|
"Qwen3DSparkModel" not in self.draft_model_config.architectures
|
||||||
and "Gemma4DSparkModel" not in self.draft_model_config.architectures
|
and "Gemma4DSparkModel" not in self.draft_model_config.architectures
|
||||||
and "K3DSparkModel" not in self.draft_model_config.architectures
|
and "K3DSparkModel" not in self.draft_model_config.architectures
|
||||||
|
|||||||
Reference in New Issue
Block a user