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
1311913f
Unverified
Commit
1311913f
authored
Apr 21, 2025
by
Woosuk Kwon
Committed by
GitHub
Apr 21, 2025
Browse files
[BugFix][Spec Decode] No in-place update to draft probs (#16952)
Signed-off-by:
Woosuk Kwon
<
woosuk.kwon@berkeley.edu
>
parent
29f395c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
vllm/v1/spec_decode/eagle.py
vllm/v1/spec_decode/eagle.py
+3
-1
No files found.
vllm/v1/spec_decode/eagle.py
View file @
1311913f
...
@@ -264,7 +264,9 @@ def compute_probs_and_sample_next_token(
...
@@ -264,7 +264,9 @@ def compute_probs_and_sample_next_token(
# TODO(woosuk): Consider seeds.
# TODO(woosuk): Consider seeds.
q
=
torch
.
empty_like
(
probs
)
q
=
torch
.
empty_like
(
probs
)
q
.
exponential_
()
q
.
exponential_
()
next_token_ids
=
probs
.
div_
(
q
).
argmax
(
dim
=-
1
).
view
(
-
1
)
# NOTE(woosuk): We shouldn't use `probs.div_(q)` because the draft_probs
# will be used later for rejection sampling.
next_token_ids
=
probs
.
div
(
q
).
argmax
(
dim
=-
1
).
view
(
-
1
)
if
not
sampling_metadata
.
all_random
:
if
not
sampling_metadata
.
all_random
:
greedy_token_ids
=
probs
.
argmax
(
dim
=-
1
)
greedy_token_ids
=
probs
.
argmax
(
dim
=-
1
)
next_token_ids
=
torch
.
where
(
next_token_ids
=
torch
.
where
(
...
...
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