NewsCrawler.org

PocketRL: training a 7B language model with reinforcement learning on one RTX 5090

PocketRL is a low-cost, memory-efficient code base for reinforcement learning with verifiable rewards (RLVR)[1] that post-trains large language models. It trains a 7B model on a single RTX 5090 and a 27B model on only four, without CPU offloading[2].

It combines two ideas. The first, called ActGRA, projects each layer's gradient and optimizer state onto a small basis fitted to the layer's input activations using QR factorisation[3]; the authors say this basis keeps far more of the gradient than the random projections used in earlier work. The second trains on 16-bit weights with half an extra byte per weight that stores the rounding error, so small updates are not lost, and the same 16-bit weights are used for inference.

Together, these methods cut memory use for training a 7B model by 84%. The authors say a competitive 7B model can be trained in less than 8 hours on a single RTX 5090 for $4.71, less than 9% of the cost of comparable models. A 27B training step costs more than 77% less than with similar code bases, and the PocketRL code base is open source.

Repository PocketRL github.com

Open source code base for cheap RLVR post-training of LLMs, fitting 7B models on a single RTX 5090 GPU with lower memory use.

Stars: 29Forks: 2License: Apache-2.0Updated:

Read the original arxiv.orgDiscussion

Sources

Published: First seen: Читать по-русски

Open as a page