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
a363d2c3
"vllm/multimodal/processing/dummy_inputs.py" did not exist on "e93ff6c8b92b7e7d067f535b52ac7c6304e6b316"
Commit
a363d2c3
authored
Nov 26, 2025
by
zhuwenwen
Browse files
[fix]修复不开mtp精度异常问题
parent
7ff48a6c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
vllm/envs.py
vllm/envs.py
+1
-1
vllm/v1/worker/gpu_model_runner.py
vllm/v1/worker/gpu_model_runner.py
+2
-2
No files found.
vllm/envs.py
View file @
a363d2c3
...
...
@@ -1188,7 +1188,7 @@ environment_variables: dict[str, Callable[[], Any]] = {
(
"true"
,
"1"
)),
"VLLM_USE_ZERO_MTP"
:
lambda
:
(
os
.
getenv
(
'VLLM_USE_ZERO_MTP'
,
'
0
'
).
lower
()
in
lambda
:
(
os
.
getenv
(
'VLLM_USE_ZERO_MTP'
,
'
1
'
).
lower
()
in
(
"true"
,
"1"
)),
# vllm will use 1-24... (not only 1 2 4 8 16 24)
...
...
vllm/v1/worker/gpu_model_runner.py
View file @
a363d2c3
...
...
@@ -3315,11 +3315,11 @@ class GPUModelRunnerMTP(GPUModelRunnerBase):
# Get the valid generated tokens.
sampled_token_ids
=
sampler_output
.
sampled_token_ids
max_gen_len
=
sampled_token_ids
.
shape
[
-
1
]
sampled_token_ids_cpu
=
sampled_token_ids
.
to
(
'cpu'
,
non_blocking
=
True
)
if
not
self
.
speculative_config
:
# Speculative decoding is not enabled.
spec_token_ids
=
None
else
:
sampled_token_ids_cpu
=
sampled_token_ids
.
to
(
'cpu'
,
non_blocking
=
True
)
self
.
spec_sampler_event
.
record
()
mask
=
(
sampled_token_ids
==
-
1
)
mask_int
=
mask
.
int
()
...
...
@@ -3338,7 +3338,7 @@ class GPUModelRunnerMTP(GPUModelRunnerBase):
)
if
max_gen_len
==
1
:
# No spec decode tokens.
valid_sampled_token_ids
=
sampled_token_ids
_cpu
.
tolist
()
valid_sampled_token_ids
=
sampled_token_ids
.
tolist
()
else
:
# Includes spec decode tokens.
self
.
spec_sampler_event
.
synchronize
()
...
...
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