小型LLMにおける推論のための強化学習:有効な手法とそうでないもの
Reinforcement Learning for Reasoning in Small LLMs: What Works and What Doesn't
March 20, 2025
著者: Quy-Anh Dang, Chris Ngo
cs.AI
要旨
大規模言語モデル(LLM)の推論能力を向上させるには、通常、膨大な計算リソースと大規模なデータセットが必要であり、リソースが限られた環境でのアクセシビリティが制限されています。本研究では、リソース制約下での小型LLMの推論能力を強化するための強化学習(RL)の可能性を探り、1.5億パラメータのモデル「DeepSeek-R1-Distill-Qwen-1.5B」に焦点を当てました。具体的には、4台のNVIDIA A40 GPU(各48GB VRAM)を使用し、24時間以内にトレーニングを行うという厳しい制約下で実験を行いました。Group Relative Policy Optimization(GRPO)アルゴリズムを適用し、コンパクトで高品質な数学的推論データセットを整備することで、モデルの挙動と性能を探るための3つの実験を実施しました。その結果、わずか7,000サンプルと42ドルのトレーニングコストで、AMC23の精度が63%から80%に向上し、AIME24では46.7%を達成し、o1-previewを上回る迅速な推論能力の向上が確認されました。これは、ベースラインモデルに比べて数千ドルのコスト削減を実現しています。ただし、長時間のトレーニングでは最適化の不安定性や長さの制約といった課題も浮かび上がりました。これらの結果は、小型LLMに対するRLベースのファインチューニングの有効性を示しており、大規模アプローチに代わるコスト効率の高い代替手段を提供します。本研究では、トレードオフに関する洞察を提供し、リソースが限られた環境でもスケーラブルな推論能力を持つLLMの基盤を築くため、コードとデータセットをオープンソースとして公開しています。詳細はhttps://github.com/knoveleng/open-rsでご覧いただけます。
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.Summary
AI-Generated Summary