add deepseekv3 and llama4

This commit is contained in:
Chranos
2026-02-11 15:24:13 +08:00
parent 2ad23aa8da
commit c584139543
5 changed files with 320 additions and 9 deletions

View File

@@ -59,12 +59,19 @@ class MLUWorker(Worker):
# mlp_speculator
speculative_config = self.speculative_config
model_config = self.model_config
speculative_args = {} if speculative_config is None \
or (speculative_config.draft_model_config.model ==
model_config.model) \
or (speculative_config.draft_model_config.hf_config.model_type
not in ["medusa", "mlp_speculator", "eagle"]) \
else {"return_hidden_states": True}
is_mtp = (speculative_config is not None
and getattr(
speculative_config.draft_model_config.hf_config,
"model_type", None) == "deepseek_mtp")
speculative_args = (
{"return_hidden_states": True} if is_mtp else
({} if speculative_config is None
or (speculative_config.draft_model_config.model ==
model_config.model)
or (speculative_config.draft_model_config.hf_config.model_type
not in ["medusa", "mlp_speculator", "eagle"])
else {"return_hidden_states": True})
)
ModelRunnerClass: Type[MLUModelRunnerBase] = MLUModelRunner
if model_runner_cls is not None: