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
07064cb1
Unverified
Commit
07064cb1
authored
Jan 02, 2025
by
Lu Fang
Committed by
GitHub
Jan 02, 2025
Browse files
[Bugfix] Check chain_speculative_sampling before calling it (#11673)
Signed-off-by:
Lu Fang
<
lufang@fb.com
>
parent
2f1e8e8f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
vllm/model_executor/layers/rejection_sampler.py
vllm/model_executor/layers/rejection_sampler.py
+1
-1
No files found.
vllm/model_executor/layers/rejection_sampler.py
View file @
07064cb1
...
@@ -118,7 +118,7 @@ class RejectionSampler(SpecDecodeStochasticBaseSampler):
...
@@ -118,7 +118,7 @@ class RejectionSampler(SpecDecodeStochasticBaseSampler):
# If use Flashinfer chain_speculative_sampling kernel
# If use Flashinfer chain_speculative_sampling kernel
# for rejection sampling
# for rejection sampling
if
self
.
use_flashinfer
:
if
self
.
use_flashinfer
and
chain_speculative_sampling
is
not
None
:
batch_size
,
k
,
_
=
draft_probs
.
shape
batch_size
,
k
,
_
=
draft_probs
.
shape
uniform_samples
=
self
.
_create_uniform_samples
(
uniform_samples
=
self
.
_create_uniform_samples
(
seeded_seqs
,
batch_size
,
k
,
draft_probs
.
device
)
seeded_seqs
,
batch_size
,
k
,
draft_probs
.
device
)
...
...
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