Sparse-RL: Breaking the Memory Wall in LLM Reinforcement Learning via Stable Sparse Rollouts
Sijia Luo, Xiaokang Zhang, Yuxuan Hu, Bohan Zhang, Ke Wang, Jinbo Su, Mengshu Sun, Lei Liang, Jing Zhang
TL;DR
Sparse-RL tackles the memory bottleneck of KV caches during long-horizon RL rollout for LLMs by uncovering a policy mismatch among dense, sparse, and learner policies. It introduces Sparsity-Aware Rejection Sampling to filter anomalous compressed-rollout trajectories and Importance-based Reweighting to correct off-policy bias, enabling stable training under a fixed KV budget. Empirical results across multiple models and benchmarks show Sparse-RL matches or surpasses dense baselines while achieving substantial memory savings, and its sparse-inference performance is robust due to Sparsity-Aware Training. The approach offers a universal framework for memory-efficient RL in LLMs, compatible with various compression methods and scalable to larger models.
Abstract
Reinforcement Learning (RL) has become essential for eliciting complex reasoning capabilities in Large Language Models (LLMs). However, the substantial memory overhead of storing Key-Value (KV) caches during long-horizon rollouts acts as a critical bottleneck, often prohibiting efficient training on limited hardware. While existing KV compression techniques offer a remedy for inference, directly applying them to RL training induces a severe policy mismatch, leading to catastrophic performance collapse. To address this, we introduce Sparse-RL empowers stable RL training under sparse rollouts. We show that instability arises from a fundamental policy mismatch among the dense old policy, the sparse sampler policy, and the learner policy. To mitigate this issue, Sparse-RL incorporates Sparsity-Aware Rejection Sampling and Importance-based Reweighting to correct the off-policy bias introduced by compression-induced information loss. Experimental results show that Sparse-RL reduces rollout overhead compared to dense baselines while preserving the performance. Furthermore, Sparse-RL inherently implements sparsity-aware training, significantly enhancing model robustness during sparse inference deployment.
