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
4e04eceb
Unverified
Commit
4e04eceb
authored
May 22, 2025
by
Bowen Wang
Committed by
GitHub
May 22, 2025
Browse files
[Bugfix] Use random hidden states in dummy sampler run (#18543)
Signed-off-by:
Bowen Wang
<
abmfy@icloud.com
>
parent
71075029
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
vllm/v1/worker/gpu_model_runner.py
vllm/v1/worker/gpu_model_runner.py
+4
-0
No files found.
vllm/v1/worker/gpu_model_runner.py
View file @
4e04eceb
...
@@ -1721,6 +1721,10 @@ class GPUModelRunner(LoRAModelRunnerMixin):
...
@@ -1721,6 +1721,10 @@ class GPUModelRunner(LoRAModelRunnerMixin):
self
,
self
,
hidden_states
:
torch
.
Tensor
,
hidden_states
:
torch
.
Tensor
,
)
->
torch
.
Tensor
:
)
->
torch
.
Tensor
:
# The dummy hidden states may contain special values,
# like `inf` or `nan`.
# To avoid breaking the sampler, we use a random tensor here instead.
hidden_states
=
torch
.
rand_like
(
hidden_states
)
logits
=
self
.
model
.
compute_logits
(
hidden_states
,
None
)
logits
=
self
.
model
.
compute_logits
(
hidden_states
,
None
)
num_reqs
=
logits
.
size
(
0
)
num_reqs
=
logits
.
size
(
0
)
...
...
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