Add Countdown number game RL recipe#594
Open
YujiaBao wants to merge 2 commits intothinking-machines-lab:mainfrom
Open
Add Countdown number game RL recipe#594YujiaBao wants to merge 2 commits intothinking-machines-lab:mainfrom
YujiaBao wants to merge 2 commits intothinking-machines-lab:mainfrom
Conversation
GRPO training on [Jiayi-Pan/Countdown-Tasks-3to4](https://huggingface.co/datasets/Jiayi-Pan/Countdown-Tasks-3to4) where models learn to reach a target number using 3-4 input numbers with basic arithmetic (+, -, *, /). **Key features:** - Verifiable reward with partial credit for "close but wrong" answers, converting all-bad GRPO groups into useful training signal - Configurable reward mode (`binary` vs `partial`) - KL penalty support via KLReferenceConfig - Fewshot prefix for cold-start format compliance **Hyperparameter sweep results** (Qwen3-4B-Instruct-2507, LoRA rank 32): | Config | Best Test Acc | |---------------------------|---------------| | binary, 512tok (baseline) | 68% | | partial, 1024tok | 76% | | partial, 2048tok, 40 steps| **85%** | Key findings: (1) partial credit adds ~4% by creating within-group reward variance, (2) token budget is the biggest lever (512→2048 = +17%), (3) model learns conciseness naturally through GRPO (avg tokens drops from 1100→500 over training). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
tinker_cookbook/recipes/countdown_rl/— GRPO training on Jiayi-Pan/Countdown-Tasks-3to4 where models combine 3-4 numbers with arithmetic to reach a targetbinaryvspartial), KL penalty support, fewshot prefixHyperparameter sweep
Test plan
pytest tinker_cookbook/recipes/countdown_rl/)🤖 Generated with Claude Code