KV4-RL:利用INT4 KV缓存量化解锁RLVR更快的异步部署
研究论文 · 2026/10/15
异步 rollout 通过减少长尾生成期间的低利用率,提升了带可验证奖励的强化学习(RLVR)的效率。持续并发还将上下文处理集中到更少的解码步骤中,增加了每步的 KV 工作负载。我们刻画了这种 KV 集中现象,并在匹配工作负载的比较中发现,KV 缓存量化带来的加速显著大于仅权重量化和权重-激活量化。然而,即使采用 token 级截断重要性采样(TIS),INT4 KV rollout 也可能损害学习。我们提出 KV4-RL,它将免校准的 INT4 KV 量化与对注意力汇和近期上下文的选择性 INT8 保护相结合。保护有限数量的位置减少了采样器不匹配,同时保留了 INT4 的大部分加速。在 Qwen3-8B-Base GRPO 训练的 400 次迭代中,KV4-RL 相比 BF16 rollout 实现了 1.80 倍的累计 rollout 加速和 1.27 倍的累计完整迭代加速,在最后 50 次迭代中达到 1.97 倍的 rollout 加速。在共同的 BF16 评估器下,对于 Qwen3-4B-Base 和 Qwen3-8B-Base,其最终六基准平均准确率与 BF16-rollout 训练的差距均在 0.5 个百分点以内。
该工作针对 RLVR 异步 rollout 中的 KV 缓存瓶颈,提出免校准 INT4 量化与选择性 INT8 保护相结合的方法,在保持与 BF16 训练相当精度的同时实现显著加速,对高效强化学习训练有实用价值。
Asynchronous rollout improves the efficiency of reinforcement learning with verifiable rewards (RLVR) by reducing under-utilization during long-tail generation. Sustained concurrency also concentrates context processing into fewer decode steps, increasing the KV workload per step. We characterize this KV concentration and find that KV cache quantization delivers substantially greater acceleration than weight-only and weight-activation quantization in our matched-workload comparisons. However, INT4 KV rollout can degrade learning even with token-level truncated importance sampling (TIS). We propose KV4-RL, which combines calibration-free INT4 KV quantization with selective INT8 protection of attention sinks and recent context. Protecting a bounded number of positions reduces sampler mismatch while retaining most of the speedup from INT4. Across 400 iterations of Qwen3-8B-Base GRPO training, KV4-RL achieves 1.80times cumulative rollout speedup and 1.27times cumulative full-iteration speedup over BF16 rollout, reaching 1.97times rollout speedup over the final 50 iterations. Under a common BF16 evaluator, its final six-benchmark mean accuracy is within 0.5 percentage points of BF16-rollout training for both Qwen3-4B-Base and Qwen3-8B-Base.