Fix seed loss when batch contains unseeded requests (#51866)

Signed-off-by: MKQuantum <121593006+MKQuantum@users.noreply.github.com>

MKQuantum committed Aug 20, 2026 at 18:38 UTC 2f41c894e320a07a46a360ee72149dd84d6f4bec
1 file changed +1 -1
vllm/v1/sample/ops/topk_topp_sampler.py
+1 -1
@@ -200,7 +200,7 @@ class TopKTopPSampler(nn.Module):
200 elif self.logprobs_mode == "processed_logprobs":
201 logits_to_return = logits.log_softmax(dim=-1, dtype=torch.float32)
202
203 - if len(generators) != logits.shape[0] and not self.use_fp64_gumbel:
203 + if not generators and not self.use_fp64_gumbel:
204 return compiled_random_sample(logits), logits_to_return
205
206 probs = logits.softmax(dim=-1, dtype=torch.float32)