Repository navigation
Conversation
…el generation_config.json vLLM's ModelConfig.generation_config defaults to "auto", which resolves any sampling parameter left unset on an OpenAI request (min_p, repetition_penalty, and formerly top_p) from the model's generation_config.json rather than neutral defaults. NeMo-RL never overrode this, so models shipping non-neutral values (e.g. Qwen2.5-0.5B-Instruct's repetition_penalty: 1.1) silently sampled off-policy while the train-side logprob rescaling replicated the distribution recorded in policy.generation.* -- an invisible mismatch. Pass generation_config="vllm" when building the shared engine kwargs so unset parameters resolve to vLLM's neutral defaults and policy.generation.* stays the single source of truth. Placed before **vllm_kwargs, so generation.vllm_kwargs.generation_config can restore the previous behavior if a model-default is ever wanted. The async server's explicit top_p assert is kept as defense-in-depth; its comment is updated to reflect the engine-level pin. Fixes NVIDIA-NeMo#3497 Signed-off-by: Shubhankar Tripathy <[email protected]>
Contributor
Author
|
/ok to test fdec4b6 |
Contributor
Author
|
@terrykong @youngeunkwon0405 — gentle ping when you have bandwidth. This one fixes the off-policy sampling drift from #3497 (model |
Contributor
Author
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.
What does this PR do ?
Passes
generation_config="vllm"in the shared engine kwargs built byBaseVllmGenerationWorker._load_model(consumed by both the syncvllm.LLMengine and the asyncAsyncEngineArgspath), so sampling parameters NeMo-RL leaves unset on a request (min_p,repetition_penalty, and formerlytop_p) resolve to vLLM's neutral defaults instead of the model'sgeneration_config.json.Without this, a model shipping non-neutral values (e.g.
Qwen2.5-0.5B-Instructwithrepetition_penalty: 1.1) silently samples off-policy while the train-side logprob rescaling replicates the distribution recorded inpolicy.generation.*— the mismatch is invisible to the existing async-server guard, which only coverstop_k/temperature/top_p. This is the engine-level fix proposed in the issue: it removes the whole class of drift rather than patching one parameter at the guard, and makespolicy.generation.*the single source of truth.Details:
**vllm_kwargs, sogeneration.vllm_kwargs.generation_configcan deliberately restore model-default behavior (e.g. if that is ever wanted for validation rollouts).top_p is not Noneassert is kept as defense-in-depth; its comment is updated since its old rationale (resolution fromgeneration_config.json) no longer applies at the engine level.Issues
Fixes #3497
Usage
No user-facing config change. To intentionally restore per-model sampling defaults:
Before your PR is "Ready for review"
generation_configis anEngineArgs/ModelConfigfield on the pinned vllm==0.25.1token_mult_prob_error-style checks guard sampling/train distribution agreement