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
87d9a261
Unverified
Commit
87d9a261
authored
Feb 05, 2026
by
jiangkuaixue123
Committed by
GitHub
Feb 04, 2026
Browse files
[Bugfix] Fix ubatch wrapper num_tokens calculate (#33694)
Signed-off-by:
jiangkuaixue123
<
jiangxiaozhou111@163.com
>
parent
80f921ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
vllm/v1/worker/gpu_ubatch_wrapper.py
vllm/v1/worker/gpu_ubatch_wrapper.py
+1
-3
No files found.
vllm/v1/worker/gpu_ubatch_wrapper.py
View file @
87d9a261
...
...
@@ -412,9 +412,7 @@ class UBatchWrapper:
attn_metadata
=
forward_context
.
attn_metadata
slot_mapping
=
forward_context
.
slot_mapping
num_tokens
=
(
ubatch_slices
[
0
].
token_slice
.
stop
-
ubatch_slices
[
0
].
token_slice
.
start
)
*
2
num_tokens
=
sum
(
ubatch_slice
.
num_tokens
for
ubatch_slice
in
ubatch_slices
)
input_ids
=
kwargs
[
"input_ids"
]
positions
=
kwargs
[
"positions"
]
intermediate_tensors
=
kwargs
[
"intermediate_tensors"
]
...
...
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