feat(vllm-model): on-policy sampling pin via sampling_overrides - #2183
Merged
ananthsub merged 0 commit intoJul 29, 2026
Merged
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
This was referenced Jul 29, 2026
ananthsub
force-pushed
the
ananthsub/tokidcap/sampling-pin
branch
from
July 29, 2026 09:19
7342d4e to
f507b6f
Compare
ananthsub
force-pushed
the
ananthsub/tokidcap/sampling-pin
branch
from
July 29, 2026 12:38
f507b6f to
190f25c
Compare
ananthsub
force-pushed
the
ananthsub/tokidcap/sampling-pin
branch
from
July 29, 2026 13:14
190f25c to
7cd8c48
Compare
Contributor
Author
|
Not actually merged. When the stack was reordered to put the sampling pin at the bottom, this PR's base branch ( Superseded by #2190, which carries the same commit with |
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.
On-policy sampling pin in the vLLM model server
Part of the token-id capture stack for #1824. Replaces #2127, which could not be retargeted after four commits were inserted into the stack (GitHub does not permit changing the base branch of a PR that is part of a stack).
Problem
An external agent picks its own sampling settings when it calls the model. During training the generation worker checks that requests use the trainer's sampling settings, so a
temperatureortop_pthe agent chose that doesn't match will either fail the run or bias the recorded rollout.What it adds
sampling_overridesinvllm_model: settemperatureandtop_pon every chat request before generation, replacing whatever the agent sent.policy_generation_temperature,policy_generation_top_p) with on-policy defaults. Gym doesn't know anything about the trainer; the trainer writes its settings into those keys (see the matching NeMo-RL change) and Gym just reads them.Notes for review
vllm_modelnever references NeMo-RL. Any training framework can drive this by filling in those config keys.Tests
No isolated unit test — the
vllm_modelserver test runs in its own environment. Verified in the 2-GPU Megatron GRPO run: sampling matched the trainer and the run stayed on-policy (generation KL ~0.04).Stack
One commit per PR, each based on the previous branch (bottom of the stack targets
main):All seven are drafts. #2179 (harness side calls) and #2128 (Claude Code example)
were closed and dropped from the stack; #2183 supersedes #2127.