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
027827cc
Unverified
Commit
027827cc
authored
Mar 19, 2025
by
Chujie Zheng
Committed by
GitHub
Mar 18, 2025
Browse files
fix long dtype in topk sampling (#15049)
parent
72a8639b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
vllm/v1/sample/sampler.py
vllm/v1/sample/sampler.py
+1
-1
No files found.
vllm/v1/sample/sampler.py
View file @
027827cc
...
...
@@ -151,7 +151,7 @@ class Sampler(nn.Module):
dim
=-
1
)
# Get with the logprob of the prompt or sampled token.
token_ids
=
token_ids
.
unsqueeze
(
-
1
)
token_ids
=
token_ids
.
unsqueeze
(
-
1
)
.
to
(
torch
.
long
)
token_logprobs
=
logprobs
.
gather
(
-
1
,
token_ids
)
# Compute the ranks of the actual token.
...
...
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