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
04b61f0e
Commit
04b61f0e
authored
Aug 10, 2025
by
王敏
Browse files
[fix]修复v1 mtp接受率低的问题
parent
dea49b15
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
vllm/v1/attention/backends/mla/common.py
vllm/v1/attention/backends/mla/common.py
+8
-5
vllm/v1/attention/backends/utils.py
vllm/v1/attention/backends/utils.py
+2
-0
vllm/v1/spec_decode/eagle.py
vllm/v1/spec_decode/eagle.py
+1
-0
No files found.
vllm/v1/attention/backends/mla/common.py
View file @
04b61f0e
...
...
@@ -546,6 +546,9 @@ class MLACommonMetadataBuilder(AttentionMetadataBuilder[M]):
device
=
self
.
runner
.
device
block_table
=
self
.
block_table
block_table_tensor
=
block_table
.
get_device_tensor
()[:
num_reqs
]
slot_mapping
=
common_attn_metadata
.
slot_mapping
if
slot_mapping
is
None
:
block_table
.
slot_mapping
[:
num_actual_tokens
].
copy_
(
block_table
.
slot_mapping_cpu
[:
num_actual_tokens
],
non_blocking
=
True
)
...
...
vllm/v1/attention/backends/utils.py
View file @
04b61f0e
...
...
@@ -45,6 +45,8 @@ class CommonAttentionMetadata:
"""(batch_size,), record the rejected tokens number in cpu and gpu"""
num_speculative_tokens
:
int
=
0
"""Number of speculative tokens"""
slot_mapping
:
torch
.
Tensor
=
None
"""(batch_size, seq_len), slot mapping"""
M
=
TypeVar
(
"M"
)
...
...
vllm/v1/spec_decode/eagle.py
View file @
04b61f0e
...
...
@@ -159,6 +159,7 @@ class EagleProposer:
num_actual_tokens
=
num_tokens
,
max_query_len
=
max_query_len
,
num_rejected_tokens
=
num_rejected_tokens
,
slot_mapping
=
target_slot_mapping
)
assert
self
.
runner
is
not
None
...
...
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