Repository navigation
[RL] Add score-centered policy gradients - #10
Closed
nanjiangwill wants to merge 1 commit into
Closed
nanjiangwill wants to merge 1 commit into
nanjiangwill wants to merge 1 commit into
Conversation
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.
Summary
Implement score centering from Score Centering Stabilizes Off-policy Reinforcement Learning end to end for Miles.
k=128by default), raw fp32 behavior log-probabilities, the sampled-token behavior score, and the detached additive correction.Estimator semantics
Modeled tail
The implementation matches the authors’ released PyTorch reference:
eps=1e-6.Without replay, request validation requires an unconstrained behavior distribution and rejects value-changing logit transforms whose full behavior distribution is unavailable.
Exact replay support
When bounded top-p/top-k replay is enabled, SGLang supplies the complete realized support and normalized behavior probability for every support token. Miles normalizes current actor logits on that same fixed support and evaluates the centering expectation exactly—there is no modeled tail. Support filters and constraints are therefore orthogonal to score centering in this mode.
Training integration
SGLang dependency
Requires the generic response metadata proposed in sgl-project/sglang#40932: raw rectangular output top-logprobs and normalized probabilities aligned with realized sampling-support IDs. The SGLang API contains no Miles- or score-centering-specific naming.
Validation
a59ed7bc6.git diff --checkpass under the repository-pinned tool versions.test_external_endpoint_owns_sampling_support_forwarding) was deselected because it independently fails on the clean target commit: it creates an external endpoint without setting the required--rollout-num-gpus 0.