Repository navigation
perf(sampler): set max_logprobs to 0 - #461
Merged
hodaaaaaaaaaa merged 1 commit intoNov 19, 2026
Merged
hodaaaaaaaaaa merged 1 commit into
hodaaaaaaaaaa merged 1 commit into
Conversation
hodaaaaaaaaaa
force-pushed
the
perf/tpu-sampler-max-logprobs
branch
from
November 19, 2026 18:31
7ecd423 to
fb29931
Compare
Signed-off-by: Hoda Mohammadi <hodamo@google.com>
hodaaaaaaaaaa
force-pushed
the
perf/tpu-sampler-max-logprobs
branch
from
November 19, 2026 18:32
fb29931 to
5c56303
Compare
ShubyM
approved these changes
Nov 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Every OpenRL sample request asks vLLM for the sampled token's logprob and no
top-k alternatives (
logprobs=0). vLLM's defaultmax_logprobsis 20, andwith any value above 0 the vllm-torchtpu runner computes a top-20 over the
whole vocabulary on every decode step, whether or not a request asked for it.
On a v6e chip that is about 10% of a decode step at batch 64 and 128.
Change
The sampler's engine args set
max_logprobs=0on every platform, for bothLoRA and FFT samplers. The sampled token's logprob is still returned. On GPU
this changes no work: vLLM's own runner sizes the top-k from what the requests
ask for and uses
max_logprobsonly as a cap on that.