A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 16, 03:15 UTC
[Bugfix] Check chain_speculative_sampling before calling it (#11673)
Signed-off-by: Lu Fang <lufang@fb.com>
Lu Fang committed
Jan 2, 2025 at 16:58 UTC
07064cb1d49d2b04ec58d8876bee2cd8281eedf5
1 file changed
+1
-1
vllm/model_executor/layers/rejection_sampler.py
+1
-1
@@ -118,7 +118,7 @@ class RejectionSampler(SpecDecodeStochasticBaseSampler):
118
119
# If use Flashinfer chain_speculative_sampling kernel
120
# for rejection sampling
121
- if self.use_flashinfer:
121
+ if self.use_flashinfer and chain_speculative_sampling is not None:
122
batch_size, k, _ = draft_probs.shape
123
uniform_samples = self._create_uniform_samples(
124
seeded_seqs, batch_size, k, draft_probs.device)