forked from Karylab-cklius/vllm
enable all moe models for mrv2
Signed-off-by: yewentao256 <zhyanwentao@126.com>
This commit is contained in:
+21
-1
@@ -90,6 +90,16 @@ def test_v2_model_runner_env_tri_state(monkeypatch, env_value, expected):
|
||||
),
|
||||
True,
|
||||
),
|
||||
(
|
||||
SimpleNamespace(
|
||||
model="Qwen/Qwen2-7B-Instruct",
|
||||
architectures=["Qwen2ForCausalLM"],
|
||||
runner_type="generate",
|
||||
is_moe=False,
|
||||
is_quantized=False,
|
||||
),
|
||||
False,
|
||||
),
|
||||
(
|
||||
SimpleNamespace(
|
||||
model="meta-llama/Llama-3.2-1B",
|
||||
@@ -140,6 +150,16 @@ def test_v2_model_runner_env_tri_state(monkeypatch, env_value, expected):
|
||||
),
|
||||
True,
|
||||
),
|
||||
(
|
||||
SimpleNamespace(
|
||||
model="deepseek-ai/DeepSeek-V3",
|
||||
architectures=["DeepseekV3ForCausalLM"],
|
||||
runner_type="generate",
|
||||
is_moe=True,
|
||||
is_quantized=False,
|
||||
),
|
||||
True,
|
||||
),
|
||||
(
|
||||
SimpleNamespace(
|
||||
model="Qwen/Qwen1.5-MoE-A2.7B",
|
||||
@@ -178,7 +198,7 @@ def test_v2_model_runner_env_tri_state(monkeypatch, env_value, expected):
|
||||
is_moe=True,
|
||||
is_quantized=False,
|
||||
),
|
||||
False,
|
||||
True,
|
||||
),
|
||||
(
|
||||
SimpleNamespace(
|
||||
|
||||
@@ -555,6 +555,9 @@ class VllmConfig:
|
||||
if model_config.runner_type != "generate":
|
||||
return False
|
||||
|
||||
if model_config.is_moe:
|
||||
return True
|
||||
|
||||
architectures = getattr(model_config, "architectures", [])
|
||||
return any(
|
||||
arch in DEFAULT_V2_MODEL_RUNNER_ARCHITECTURES for arch in architectures
|
||||
|
||||
Reference in New Issue
Block a user