Skip to content

Commit 9729773

Browse files
committed
fix model config
Signed-off-by: MengqingCao <cmq0113@163.com>
1 parent c2c5403 commit 9729773

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tests/singlecard/spec_decode/e2e/test_v1_spec_decode.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def test_ngram_correctness(
7575
with monkeypatch.context() as m:
7676
m.setenv("VLLM_USE_V1", "1")
7777

78-
ref_llm = LLM(model=model_name, max_model_len=1024)
78+
ref_llm = LLM(model=model_name, max_model_len=1024, enforce_eager=True)
7979
ref_outputs = ref_llm.chat(test_prompts, sampling_config)
8080
del ref_llm
8181

@@ -88,6 +88,7 @@ def test_ngram_correctness(
8888
"num_speculative_tokens": 3,
8989
},
9090
max_model_len=1024,
91+
enforce_eager=True,
9192
)
9293
spec_outputs = spec_llm.chat(test_prompts, sampling_config)
9394
matches = 0
@@ -138,6 +139,7 @@ def test_eagle_correctness(
138139
"max_model_len": 2048,
139140
},
140141
max_model_len=2048,
142+
enforce_eager=True,
141143
)
142144
spec_outputs = spec_llm.chat(test_prompts, sampling_config)
143145
matches = 0

vllm_ascend/platform.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def check_and_update_config(cls, vllm_config: VllmConfig) -> None:
141141
"NPU graph mode is still experimental and not supported for V1 without mla currently, "
142142
"it has been disabled automatically.")
143143
vllm_config.additional_config["enable_graph_mode"] = False
144-
elif envs.VLLM_USE_V1 and not enforce_eager:
144+
elif envs.VLLM_USE_V1 and model_config is not None and not enforce_eager:
145145
model_type = model_config.hf_config.model_type
146146
if "deepseek" in model_type:
147147
raise NotImplementedError(

0 commit comments

Comments
 (0)