[Question] Would an adaptive in-reward KL controller fit Slime's PPO/RLHF scope?
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Active
- Tech stack
- python
- Domain
- ai, machine-learning
Research direction
Start by reviewing Slime's current PPO token-level reward construction and existing --kl-coef path described in the issue, then compare the requested behavior with verl's AdaptiveKLController. A completed implementation would need bounded cross-batch updates, checkpointed state, metrics, unit tests, and a reproducible PPO benchmark while leaving defaults and GRPO semantics unchanged.
Written by the indexing model from the issue text.
Description
Your Question
Question
Would an opt-in adaptive in-reward KL controller for PPO-style reference-policy training fit Slime's current scope for general-purpose RL optimizations?
Proposal
The proposal is deliberately limited to the existing PPO/RLHF-style reward-side KL path:
observed reference KL -> update beta -> next-batch reward shaping
r'_t = task_reward_t - beta * KL_t
The controller would adapt the existing --kl-coef between batches toward a target KL, with bounded updates, a configurable horizon, checkpointed state, and metrics for observed KL, target KL, coefficient, and update status. The default behavior would remain fixed-coefficient and unchanged.
This would run alongside PPO clipping; it would not modify eps_clip or the PPO ratio objective.
Scope boundary
This is not a proposal to change the current GRPO reward semantics. I understand the maintainer direction in #399: GRPO should prefer kl_loss unless experiments show that reward-side KL is beneficial. The first implementation would target PPO-style training only, where reward-side KL is already part of the existing path.
Would a focused implementation with unit tests and a reproducible training benchmark be considered an in-scope general-purpose RL optimization? If so, I would be happy to prepare a small PR rather than a broad abstraction proposal.
What I've Tried
I checked the current Slime implementation and related discussions:
- #397 identified that GRPO's non-zero --kl-coef was effectively ignored.
- #399 proposed applying KL to GRPO rewards, but the maintainer discussion preferred kl_loss for GRPO unless supported by experiments.
- #1247 made a similar GRPO reward-side change and was closed without being merged.
- In the current PPO path, --kl-coef is applied during token-level reward construction before GAE.
- In verl's implementation, AdaptiveKLController updates the coefficient from the batch KL toward a target KL. The implementation cites Ziegler et al.'s RLHF work (arXiv:1909.08593).
I have intentionally not included GRPO, TTTD, OPD, standalone kl_loss_coef, or evaluation/rollback orchestration in this proposal. Those have different semantics and should be considered separately.
Environment (if relevant)
This is an algorithm/API-scope question rather than a runtime bug. No specific hardware or environment is required at this stage.
Additional Context
Related discussion: Human-Agent-Society/reef#466.
The goal is to clarify ownership and scope before writing code. Slime would own the training-side controller; any held-out evaluation or publish/pause/rollback policy would remain outside this proposed Slime change.
Pre-submission Checklist
- I have read the CONTRIBUTING.md and understand the collaboration scope.
- I have read the documentation and FAQ and my question is not answered there.
- I have searched for existing issues and my question has not been asked before.
- Dominant language
- Python
- Stars
- 8.8k
- Forks
- 1.3k
- Avg merge
- 20h 16m
- Merged PRs (30d)
- 24
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from THUDM/slime
-
[Bug] Math reward accepts distinct large integers after float normalizationPossibly taken @lll-hhh claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
gpqa: when no option letter can be extracted, a single-letter gold label is substring-matched against the whole reply, so a reply that never answers can score 1.0Possibly taken @shaurya416 claimed this 39 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
[Bug] shipped dynamic-sampling filters crash on fan-out groups (list[list[Sample]]) from multi-turn agent rolloutsPossibly taken @QIU-Guanzong claimed this 51 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
[Bug] W&B initialization fails with wandb 0.28.2 because wandb.util.generate_id was removedPossibly taken @cyyecao-lappland claimed this 69 days ago. Openbug
Difficulty 1/5 1-3 hours Newbie friendliness 90/100
THUDM/slime#2332 · 1 comment ·
Maintainers usually reply within 1 day
-
[Bug] solution_str = sample.prompt + sample.responsePossibly taken @mvanhorn claimed this 133 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
THUDM/slime#1829 · 1 comment ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
microsoft/markitdown#2820 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
yt-project/yt#5624 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
NousResearch/hermes-agent#148376 ·
Maintainers usually reply within 1 day