arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2503.16219cs.LGcs.CL
收藏

用于小型大语言模型推理的强化学习:什么有效,什么无效

Reinforcement Learning for Reasoning in Small LLMs: What Works and What Doesn't

Quy-Anh Dang, Chris Ngo

AI总结:

本研究通过强化学习提升小型LLM的推理能力,展示了在有限资源下实现显著性能提升的可行性。

摘要:

增强大型语言模型(LLM)的推理能力通常依赖于大量的计算资源和庞大的数据集,限制了资源受限环境下的可访问性。我们的研究探讨了强化学习(RL)在提升小型LLM推理能力方面的潜力,重点研究了一个15亿参数的模型,DeepSeek-R1-Distill-Qwen-1.5B,在严格限制条件下:在24小时内使用4块NVIDIA A40 GPU(每块48GB VRAM)进行训练。采用改进的组相对策略优化(GRPO)算法,并整理了一个紧凑、高质量的数学推理数据集,我们进行了三个实验来探索模型行为和性能。我们的结果表明推理能力迅速提升——例如AMC23的准确率从63%提升到80%,AIME24达到46.7%,超越o1-preview——仅使用7000个样本和42美元的训练成本,相比基线模型数千美元的成本。然而,长期训练中出现了优化不稳定性和长度限制等挑战。这些发现突显了基于RL的微调在小型LLM中的有效性,为大规模方法提供了一种成本效益更高的替代方案。我们发布了我们的代码和数据集作为开源资源,提供了关于权衡的见解,并为资源受限环境中的可扩展、具备推理能力的LLM奠定了基础。所有资源均在https://github.com/knoveleng/open-rs上提供。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑