Train DeepSeek-R1-Distill-Qwen-1.5B with GRPO on DAPO-Math-17K via SLIME
harbor run -t ale/math-post-trainingharbor download ale/math-post-trainingTrain the DeepSeek-R1-Distill-Qwen-1.5B model using GRPO (Group Relative Policy Optimization) on the DAPO-Math-17K dataset, leveraging the SLIME reinforcement learning framework.
After training, the model must achieve avg@32 ≥ 50% on AIME 2024 (30 problems, 32 samples per problem with temperature 0.7, top-p 0.9, max 32K generation tokens). The avg@32 metric is computed as: for each problem, calculate the fraction of the 32 samples that produce the correct answer, then average across all 30 problems.
Write the final AIME 2024 avg@32 score to /app/result.txt as a single floating-point number (e.g., 52.6).
deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B (HuggingFace)DAPO-Math-17K — 17K mathematical reasoning problems with verified answers (HuggingFace: BytedTsinghua/DAPO-Math-17k)https://github.com/SLIME-AI/SLIMEGRPO computes advantages via group normalization. For a prompt x with G rollouts {y_1, ..., y_G} receiving binary rewards {r_1, ..., r_G}:
A_i = (r_i - mean(r)) / (std(r) + eps)The reward is binary: r=1 if the final answer matches ground truth, r=0 otherwise. Use the DAPO rule-based verifier for reward computation (no SymPy, no model-based verifier).
Use the following fixed configuration (no changes throughout training). The original JustRL recipe uses 32×A800-80GB GPUs. Adapt batch sizes to the available GPU count while preserving the effective global batch size via gradient accumulation.
| Hyperparameter | Value |
|---|---|
| Advantage estimator | GRPO |
| Use KL loss | No |
| Use entropy regularization | No |
| Train batch size (global) | 256 prompts |
| Max prompt length | 1K tokens |
| Max response length | 15K tokens |
| PPO mini batch size | 64 |
| PPO micro batch size per GPU | 1 |
| Clip ratio range | [0.8, 1.28] |
| Learning rate | 1e-6 (constant, no schedule) |
| Optimizer | Adam |
| Temperature (rollout sampling) | 1.0 |
| Rollout N (samples per prompt) | 8 |
| Reward function | DAPO rule-based verifier |
| Training stages | 1 (single-stage, no curriculum) |
| Target training steps | ~4,000+ |
GPU Configuration: TODO
deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B from HuggingFace"Please reason step by step, and put your final answer within \boxed{}."\boxed{} formatUse the DAPO rule-based verifier:
\boxed{...}\boxed{...}, compare with ground truth using the DAPO rule-based verifier/app/result.txtBased on published results (JustRL paper), you should observe:
If entropy collapses below 0.5, something is wrong (likely an unintended length penalty or reward shaping).