Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
19f76ee6
Unverified
Commit
19f76ee6
authored
Sep 26, 2025
by
yyzxw
Committed by
GitHub
Sep 26, 2025
Browse files
[misc] refactor speculative config (#25657)
Signed-off-by:
zxw
<
1020938856@qq.com
>
parent
dd70437a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
vllm/config/speculative.py
vllm/config/speculative.py
+6
-8
No files found.
vllm/config/speculative.py
View file @
19f76ee6
...
...
@@ -209,12 +209,9 @@ class SpeculativeConfig:
if
self
.
model
is
None
and
self
.
num_speculative_tokens
is
not
None
:
# TODO(Shangming): Refactor mtp configuration logic when supporting
# mtp acceleration for more models besides deepseek_v3
if
self
.
target_model_config
and
\
(
self
.
target_model_config
.
hf_text_config
.
model_type
\
==
"deepseek_v3"
or
self
.
target_model_config
.
hf_text_config
.
model_type
in
(
"mimo"
,
"ernie4_5_moe"
,
"qwen3_next"
)):
if
(
self
.
target_model_config
and
self
.
target_model_config
.
hf_text_config
.
model_type
in
(
"deepseek_v3"
,
"mimo"
,
"ernie4_5_moe"
,
"qwen3_next"
)):
# use the draft model from the same model:
self
.
model
=
self
.
target_model_config
.
model
# Align the quantization of draft model for cases such as
...
...
@@ -224,8 +221,9 @@ class SpeculativeConfig:
elif
self
.
method
in
(
"ngram"
,
"[ngram]"
):
self
.
model
=
"ngram"
else
:
raise
ValueError
(
"num_speculative_tokens was provided without "
"speculative model."
)
raise
ValueError
(
"num_speculative_tokens was provided but without "
"speculative model."
)
# Automatically configure the method for ngram when "model" is used
# instead of "method"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment