16 Policy Optimization Methods for LLM Training
Running large open models locally traditionally required expensive workstations with sufficient GPU VRAM or unified memory. Magnitude is an open-source inference engine that circumvents this requirement using SSD expert streaming for sparse mixture-of-experts (MoE) models. By keeping frequently used experts and attention in memory while streaming the rest directly from NVMe SSDs, it runs models like the 180B Qwen 3.8 Flash Next on an M4 Max with 64 GB of memory at 56 tokens per second. This approach shifts the local inference bottleneck from memory capacity to storage speed. This overview breaks down how reinforcement learning is applied to large language model training by contrasting various policy optimization algorithms. Rather than just relying on the raw reward from a verifier, these techniques differ in how baselines are computed, how credit is allocated to intermediate steps, and how updates are regularized or clipped. While traditional approaches like PPO train a separate critic network to establish an advantage baseline, many modern variants such as GRPO, RLOO, and ReMax derive baselines directly through grouped sample rollouts or greedy decoding to reduce compute overhead.
Big moment for Local AI!
Running large open models locally traditionally required expensive workstations with sufficient GPU VRAM or unified memory. Magnitude is an open-source inference engine that circumvents this requirement using SSD expert streaming for sparse mixture-of-experts (MoE) models. By keeping frequently used experts and attention in memory while streaming the rest directly from NVMe SSDs, it runs models like the 180B Qwen 3.8 Flash Next on an M4 Max with 64 GB of memory at 56 tokens per second. This approach shifts the local inference bottleneck from memory capacity to storage speed.
- Qwen 3.8 Flash Next is a 180B-parameter MoE model that only activates around 6B parameters per token, leaving roughly 97% of the model idle per token.
- Magnitude enables running Qwen 3.8 Flash Next with a 2-bit quantization and 64k context on an Apple M4 Max with 64 GB of unified memory at 56 tokens/sec.
- Magnitude's SSD expert streaming retains attention and frequently reused experts in GPU memory while streaming infrequently used experts directly from NVMe SSDs without OS swap or SSD writes.
- The engine addresses naive streaming latency bottlenecks via expert reuse ranking, speculative prefetching, cross-layer scheduled NVMe reads, and prefill caching optimizations.
- Magnitude is Apache 2.0 licensed, supports Apple Silicon, NVIDIA, AMD, Intel, and plain CPU architectures, and offers an OpenAI-compatible API.
- Hardware integration allows Magnitude to profile system specifications on launch, predict tokens per second prior to model download, and automatically optimize kernels.
16 policy optimization methods for LLM training
This overview breaks down how reinforcement learning is applied to large language model training by contrasting various policy optimization algorithms. Rather than just relying on the raw reward from a verifier, these techniques differ in how baselines are computed, how credit is allocated to intermediate steps, and how updates are regularized or clipped. While traditional approaches like PPO train a separate critic network to establish an advantage baseline, many modern variants such as GRPO, RLOO, and ReMax derive baselines directly through grouped sample rollouts or greedy decoding to reduce compute overhead.
- Policy optimization methods for LLMs differ primarily in baseline estimation, normalization scope, and how importance ratios or losses are aggregated and clipped.
- Methods like GRPO, RLOO, and ReMax eliminate the memory and compute overhead of training a critic network by using grouped sample averages or greedy rollouts as baselines.
- Dr. GRPO removes group standard-deviation scaling and response-length division from GRPO to eliminate specific optimization biases.
- Techniques like GSPO, CISPO, and SAPO focus on regulating importance ratios and update scaling via sequence-level clipping, weight clipping, or smooth temperature gates instead of standard hard token clipping.
- For intermediate step credit assignment in reasoning tasks, VAPO improves learned critic networks while VinePPO generates multiple rollouts from intermediate states to estimate value without a learned critic.
- Evaluating the efficiency of RL algorithms requires accounting for both rollout generation compute and model update costs, rather than solely considering the removal of a critic.