Skip to content

Commit ac23eb7

Browse files
committed
skip compute_logprobs
Signed-off-by: NickLucche <[email protected]>
1 parent 45bda4e commit ac23eb7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

vllm/v1/sample/tpu/sampler.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ def forward(
2828
# temperature scaling) for the top-k logprobs.
2929
# This is different from the V0 sampler, which uses the logits that
3030
# is used for sampling (after penalties and temperature scaling).
31-
raw_logprobs = self.compute_logprobs(logits)
31+
if sampling_metadata.logprobs:
32+
raw_logprobs = self.compute_logprobs(logits)
3233

3334
# Use float32 for the logits.
3435
logits = logits.to(torch.float32)

0 commit comments

Comments
 (0)