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

Signed-off-by: MKQuantum <121593006+MKQuantum@users.noreply.github.com>
This commit is contained in:
MKQuantum
2026-08-20 22:38:53 +00:00
committed by GitHub
parent 54ba80d961
commit 2f41c894e3
+1 -1
View File
@@ -200,7 +200,7 @@ class TopKTopPSampler(nn.Module):
elif self.logprobs_mode == "processed_logprobs":
logits_to_return = logits.log_softmax(dim=-1, dtype=torch.float32)
if len(generators) != logits.shape[0] and not self.use_fp64_gumbel:
if not generators and not self.use_fp64_gumbel:
return compiled_random_sample(logits), logits_to_return
probs = logits.softmax(dim=-1, dtype=torch.float32)