NVIDIA推荐LoGRA:用更低显存实现LLM全量权重RL训练
Recommended NVIDIA paper on memory-efficient post-training RL.
做RLHF或DPO的同学必看,LoGRA展示了如何用比LoRA更少的显存跑全量权重更新,直接解决大模型RL训练的显存瓶颈,建议对照论文复现验证。
Recommended NVIDIA paper on memory-efficient post-training RL.
NVIDIA 推荐的关于内存高效的训练后强化学习的论文。
A very interesting technique for scaling RL for LLMs.
一种用于扩展 LLM 强化学习规模的非常有趣的技术。
The main takeaway is that you can update all of a model's weights with RL and still use less memory than LoRA. At 1.5B, LoGRA averages 7.2 GiB of training memory, while rank-256 LoRA needs 13.2 GiB. Pass@4 is about the same (81.8% and 81.4%), and Pass@1 is about 2 points lower.
主要结论是,你可以使用 RL 更新模型的所有权重,同时使用的内存仍比 LoRA 少。在 1.5B 参数规模下,LoGRA 平均占用 7.2 GiB 的训练内存,而 rank-256 的 LoRA 需要 13.2 GiB。Pass@4 大致相同(分别为 81.8% 和 81.4%),Pass@1 则低约 2 个百分点。
If GPU memory is what stops you from running RL on a bigger model, this method is worth a look.
如果 GPU 内存是你无法在更大模型上运行 RL 的原因,那么值得看看这种方法。
LoGRA never builds a full gradient for the weight matrices it compresses.
LoGRA 从不为其压缩的权重矩阵构建完整的梯度。
As microbatches accumulate, each weight gradient is compressed with a rank-256 random projection that is redrawn every step, and the update is rebuilt from two small matrices. Before each step, it predicts how much the policy will change and scales the step to stay within a KL budget.
随着微批次的累积,每个权重梯度都会通过一个每步重新绘制的 rank-256 随机投影进行压缩,并从两个小矩阵重建更新量。在每一步之前,它会预测策略的变化幅度,并对步长进行缩放以保持在 KL 预算范围内。
Average training memory per GPU drops 45.7% at 7B (31.8 to 17.3 GiB), with peak accuracy close to dense Adam (72.3% and 72.5% Pass@1).
每块 GPU 的平均训练内存降低了 45.7%(从 31.8 GiB 降至 17.3 GiB),峰值准确率接近密集 Adam(Pass@1 分别为 72.3% 和 72.5%)。
It also trains a 27B model for more than 1,100 steps on a single eight-GPU node, where dense Adam runs out of memory.
它还在单个八卡节点上训练了一个 27B 模型超过 1,100 步,而在此场景下密集 Adam 会因内存不足而失败。
Paper: https://arxiv.org/abs/2610.06647
论文:https://arxiv.org/abs/2610.06647
Chat with Paper: https://academy.dair.ai/papers/logra-scaling-llm-reinforcement-learning-with-low-rank-gradient-sketches-2610.06647
与论文对话:https://academy.dair.ai/papers/logra-scaling-llm-reinforcement-learning-with-low-rank-gradient-sketches-2610.06647
更进一步:量化金融体系
看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力