Skip to content

fix: preserve raw PPO reference KL - #2408

Closed
hkxxxxx wants to merge 1 commit into
THUDM:mainfrom
hkxxxxx:codex/slime-raw-reference-kl
Closed

hkxxxxx wants to merge 1 commit into
THUDM:mainfrom
hkxxxxx:codex/slime-raw-reference-kl

Conversation

@hkxxxxx

@hkxxxxx hkxxxxx commented Sep 23, 2026

Copy link
Copy Markdown

This fixes an in-place mutation bug in Slime's PPO reference-KL reward shaping path.

Before this change, the raw reference-policy KL tensor was multiplied by kl_coef in place before Reef could consume it for adaptive-KL telemetry. The change preserves the raw KL tensor and uses a separate reward-shaping tensor.

Validation:

  • tests/test_ppo_reference_kl.py: 1 passed
  • No model, recipe, or default behavior changes.

@hkxxxxx hkxxxxx closed this Sep 23, 2026
@hkxxxxx

hkxxxxx commented Sep 23, 2026

Copy link
Copy Markdown
Author

This fix is already included upstream in #2114
(commit 045310b, "fix(ppo): preserve raw KL so rollout/kl logging is correct").

The current THUDM/main implementation already preserves raw KL,
so this PR is no longer needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant