forked from Karylab-cklius/vllm
[Model Runner v2] Migration from v1 to v2, with Qwen and DSv2 MOE models [3/N] (#42667)
Signed-off-by: yewentao256 <zhyanwentao@126.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent
cf567cbc71
commit
78739c1946
+52
-2
@@ -122,8 +122,58 @@ def test_v2_model_runner_env_tri_state(monkeypatch, env_value, expected):
|
||||
),
|
||||
(
|
||||
SimpleNamespace(
|
||||
model="Qwen/Qwen3-30B-A3B",
|
||||
architectures=["Qwen3MoeForCausalLM"],
|
||||
model="deepseek-ai/DeepSeek-V2-Lite-Chat",
|
||||
architectures=["DeepseekV2ForCausalLM"],
|
||||
runner_type="generate",
|
||||
is_moe=True,
|
||||
is_quantized=False,
|
||||
),
|
||||
True,
|
||||
),
|
||||
(
|
||||
SimpleNamespace(
|
||||
model="deepseek-ai/DeepSeek-V2-Chat",
|
||||
architectures=["DeepseekV2ForCausalLM"],
|
||||
runner_type="generate",
|
||||
is_moe=True,
|
||||
is_quantized=False,
|
||||
),
|
||||
True,
|
||||
),
|
||||
(
|
||||
SimpleNamespace(
|
||||
model="Qwen/Qwen1.5-MoE-A2.7B",
|
||||
architectures=["Qwen2MoeForCausalLM"],
|
||||
runner_type="generate",
|
||||
is_moe=True,
|
||||
is_quantized=False,
|
||||
),
|
||||
True,
|
||||
),
|
||||
(
|
||||
SimpleNamespace(
|
||||
model="Qwen/Qwen1.5-MoE-A2.7B-Chat",
|
||||
architectures=["Qwen2MoeForCausalLM"],
|
||||
runner_type="generate",
|
||||
is_moe=True,
|
||||
is_quantized=False,
|
||||
),
|
||||
True,
|
||||
),
|
||||
(
|
||||
SimpleNamespace(
|
||||
model="ibm-research/PowerMoE-3b",
|
||||
architectures=["GraniteMoeForCausalLM"],
|
||||
runner_type="generate",
|
||||
is_moe=True,
|
||||
is_quantized=False,
|
||||
),
|
||||
False,
|
||||
),
|
||||
(
|
||||
SimpleNamespace(
|
||||
model="mistralai/Mixtral-8x7B-Instruct-v0.1",
|
||||
architectures=["MixtralForCausalLM"],
|
||||
runner_type="generate",
|
||||
is_moe=True,
|
||||
is_quantized=False,
|
||||
|
||||
+11
-6
@@ -67,9 +67,11 @@ logger = init_logger(__name__)
|
||||
|
||||
DEFAULT_V2_MODEL_RUNNER_ARCHITECTURES = frozenset(
|
||||
{
|
||||
"Qwen3ForCausalLM",
|
||||
"DeepseekV2ForCausalLM",
|
||||
"Qwen2MoeForCausalLM",
|
||||
"LlamaForCausalLM",
|
||||
"MistralForCausalLM",
|
||||
"Qwen3ForCausalLM",
|
||||
}
|
||||
)
|
||||
|
||||
@@ -559,13 +561,13 @@ class VllmConfig:
|
||||
if model_config.runner_type != "generate":
|
||||
return False
|
||||
|
||||
architectures = getattr(model_config, "architectures", [])
|
||||
if not any(
|
||||
arch in DEFAULT_V2_MODEL_RUNNER_ARCHITECTURES for arch in architectures
|
||||
):
|
||||
if model_config.is_quantized:
|
||||
return False
|
||||
|
||||
return not model_config.is_moe and not model_config.is_quantized
|
||||
architectures = getattr(model_config, "architectures", [])
|
||||
return any(
|
||||
arch in DEFAULT_V2_MODEL_RUNNER_ARCHITECTURES for arch in architectures
|
||||
)
|
||||
|
||||
@property
|
||||
def needs_dp_coordinator(self) -> bool:
|
||||
@@ -2020,6 +2022,9 @@ class VllmConfig:
|
||||
if self.parallel_config.enable_dbo:
|
||||
unsupported.append("dual batch overlap")
|
||||
|
||||
if self.parallel_config.enable_elastic_ep:
|
||||
unsupported.append("elastic expert parallelism")
|
||||
|
||||
if model_config is not None and model_config.enable_return_routed_experts:
|
||||
# Will be added by https://github.com/vllm-project/vllm/pull/38163
|
||||
unsupported.append("routed experts capture")
|
||||
|
||||
Reference in New Issue
Block a user