Fold pipeline RL into GSM8K example and add client fixes#2
Open
kiddyboots216 wants to merge 11 commits into
Open
Fold pipeline RL into GSM8K example and add client fixes#2kiddyboots216 wants to merge 11 commits into
kiddyboots216 wants to merge 11 commits into
Conversation
Adds examples/filler_rl.py — a ~1000-line pipeline RL script for training models to generate random-number filler tokens before answering 4-digit multiplication problems. This is the minimal "V3" filler RL implementation, distilled from the 2900-line tomi version. Key design decisions (hardcoded, not configurable): - Random number filler only - 4-digit multiplication problems - answer_only advantage weighting (filler tokens get 0 advantage) - maxrl advantage normalization - PPO clipping (policy_loss) - Full-weights with NCCL sync (no LoRA) - Pipeline RL always on (generation overlaps training)
…ull_weights_safetensors The xorl server doesn't have a /api/v1/save_full_weights_safetensors endpoint. In full-weights mode, save_weights_for_sampler does the same thing (saves full model as safetensors via save_full_weights operation). Also fixes default log_path to use /data/apanda/outputs/.
When all samples for a problem have identical reward (zero advantage), draw a fresh problem from the eval pool and sample it. This fills the datum budget so training steps have more gradient signal. Reward metrics (mean, correct_rate, format_rate) are computed from the original batch only — replacements contribute datums but don't inflate the reported numbers, since all-correct groups being replaced would otherwise bias reward upward.
2fd12ba to
7b2f372
Compare
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
examples/qwen_gsm8k_rl_loop.pyrouted_expert_logitssupport toDatumandTrainingClientrequest forwardingCloses #4.
Supersedes #5.
Testing
python -m py_compile examples/qwen_gsm8k_rl_loop.pypytest -q tests/test_training_client.py tests/test_types.py tests/test_chunked_forward_backward.py