用强化学习让小模型快速提升推理能力,成本仅需42美元。
Reinforcement Learning for Reasoning in Small LLMs: What Works and What Doesn't
- 采用GRPO算法和高质量数学数据集,7000样本训练
- 小模型在AMC23上准确率从63%升至80%,超o1-preview
- 适合资源受限场景,开源代码可复现
提升大语言模型推理能力通常依赖大量计算资源和数据,限制了资源受限环境的应用。本研究探索强化学习(RL)在小模型上的潜力,针对一个15亿参数的模型(DeepSeek-R1-Distill-Qwen-1.5B),在4块A40 GPU(每块48GB显存)上24小时内完成训练。通过适配组相对策略优化(GRPO)算法并构建紧凑高质量的数学推理数据集,开展三项实验。结果表明,仅用7000样本和42美元训练成本,模型在AMC23上的准确率从63%提升至80%,在AIME24上达到46.7%,超过o1-preview。但长期训练中出现优化不稳定性与长度限制问题。研究验证了基于RL微调小模型的有效性,为资源受限环境提供了低成本替代方案。代码与数据集已开源,详见https://github.com/knoveleng/open-rs。
原文摘要 · Abstract (English)
Enhancing the reasoning capabilities of large language models (LLMs) typically relies on massive computational resources and extensive datasets, limiting accessibility for resource-constrained settings. Our study investigates the potential of reinforcement learning (RL) to improve reasoning in small LLMs, focusing on a 1.5-billion-parameter model, DeepSeek-R1-Distill-Qwen-1.5B, under strict constraints: training on 4 NVIDIA A40 GPUs (48 GB VRAM each) within 24 hours. Adapting the Group Relative Policy Optimization (GRPO) algorithm and curating a compact, high-quality mathematical reasoning dataset, we conducted three experiments to explore model behavior and performance. Our results demonstrate rapid reasoning gains - e.g., AMC23 accuracy rising from 63% to 80% and AIME24 reaching 46.7%, surpassing o1-preview - using only 7,000 samples and a $42 training cost, compared to thousands of dollars for baseline models. However, challenges such as optimization instability and length constraints emerged with prolonged training. These findings highlight the efficacy of RL-based fine-tuning for small LLMs, offering a cost-effective alternative to large-scale approaches. We release our code and datasets as open-source resources, providing insights into trade-offs and laying a foundation for scalable, reasoning-capable LLMs in resource-limited environments. All are available at https://github.com/knoveleng/open-rs.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。