Lightning OPD: Efficient Post-Training for Large Reasoning Models with Offline On-Policy Distillation

Yecheng Wu, Song Han, Hai CaiarXiv 2026

TL;DR

On-policy distillation (OPD) significantly boosts large language model (LLM) reasoning capabilities, but its reliance on a live teacher server during training creates massive infrastructure bottlenecks. Lightning OPD solves this by moving the teacher offline, precomputing log-probabilities once, and eliminating the live server entirely. By identifying and enforcing a crucial design principle called "teacher consistency," Lightning OPD achieves up to a 4.0× increase in training efficiency while matching or exceeding the performance of standard online distillation.

What Problem Does This Paper Address?

Post-training pipelines for reasoning models typically involve Supervised Fine-Tuning (SFT) followed by Reinforcement Learning (RL) or On-Policy Distillation (OPD). OPD trains a smaller student model to match the token-level distribution of a larger, stronger teacher model based on trajectories generated by the student.

While highly effective, standard OPD introduces a severe infrastructure bottleneck: a dedicated, multi-GPU teacher server must run in parallel with the student training job to score every single rollout online. This co-hosting requirement fragments GPU resources and often leads to Out-of-Memory (OOM) errors, especially when scaling to large or Mixture-of-Experts (MoE) architectures.

Naive attempts to perform OPD offline—by precomputing teacher log-probabilities on a fixed dataset—traditionally fail to match online performance. This paper investigates why these offline attempts fail and introduces a solution to make offline distillation mathematically sound and highly efficient.

Methods

The authors discover that the failure of naive offline distillation stems from a previously overlooked condition they term teacher consistency. In typical post-training pipelines, the teacher used to generate the initial SFT dataset is often different from the teacher used during the subsequent OPD stage. The authors prove that this mismatch introduces an irreducible gradient bias that degrades performance.

Overview of the Lightning OPD pipeline, showing the SFT stage and the two-phase offline OPD stage.

By enforcing teacher consistency (using the exact same teacher model for both SFT data generation and OPD), the authors introduce Lightning OPD, which operates in two distinct stages:

  1. Stage 1: Supervised Fine-Tuning (SFT): The base model is fine-tuned on trajectories generated by a chosen teacher ($\pi_T$) to produce a reference policy ($\pi_{\text{ref}}$).
  2. Stage 2: Offline On-Policy Distillation:
  3. Preprocessing Phase: Rollouts are sampled from $\pi_{\text{ref}}$, and the teacher ($\pi_T$) is queried just once to precompute and store per-token log-probabilities, creating a fixed offline dataset.
  4. Training Phase: The student model is trained on this offline dataset using policy gradient optimization. No live teacher server is required.

The authors provide a rigorous theoretical analysis proving that under teacher consistency, Lightning OPD shares the same mathematical optimum as standard online OPD. Furthermore, the offline objective introduces an implicit regularization effect (a "restoring force") that naturally prevents policy drift without requiring an explicit KL-divergence penalty.

Datasets

  • SFT Stage: OpenThoughts-3 (with responses generated by the respective teacher model to maintain consistency).
  • OPD Stage:
  • Math Reasoning: DAPO-Math-17k (17K competition-level math problems).
  • Code Generation: A 30K sampled subset of EpiCoder-func-380k.
  • Evaluation Benchmarks: AIME 2024, AIME 2025, HMMT 2025, LiveCodeBench v5, and LiveCodeBench v6.

Key Insights and Ideas

  • The "Aha!" Moment of Teacher Consistency: Mismatching the SFT teacher and the OPD teacher corrupts the reference distribution in two roles simultaneously for offline distillation. Enforcing consistency eliminates this structural gradient bias.
  • Implicit Trust-Region Regularization: In Lightning OPD, fixing the rollout distribution to $\pi_{\text{ref}}$ creates a covariance correction term. As the student model drifts, this term acts as a natural stabilizer, keeping the student close to the reference policy without needing explicit hyperparameter tuning for a KL penalty.
  • Capacity-Limited Ceilings: The performance ceiling of distillation is primarily determined by the student model's capacity relative to the teacher, rather than the minor distribution shifts caused by using offline rollouts instead of online ones.

Key Results

Lightning OPD dramatically reduces training costs while delivering comparable or superior accuracy across math and coding benchmarks.

Performance and training cost comparison between SFT, standard OPD, and Lightning OPD across 4B and 8B model scales.
  • Efficiency Gains: Lightning OPD achieved a 4.0× speedup at the 8B scale (reducing total training from 120 to 30 GPU hours) and a 3.6× speedup at the 4B scale (reducing 72 to 20 GPU hours).
  • State-of-the-Art Reasoning: Starting from a Qwen3-8B-Base model, Lightning OPD reached 69.9% on AIME 2024 in just 30 GPU hours.
  • Scaling to MoE: Standard online OPD completely ran out of memory (OOM) when attempting to train a 30B Mixture-of-Experts model (Qwen3-30B-A3B) due to co-hosting overhead. Lightning OPD successfully trained the model on a single 8×H100 node, achieving 71.0% on AIME 2024 and 60.8% on LiveCodeBench v5.

Limitations and Future Work

  • Domain Specificity: The evaluation focused strictly on mathematical reasoning and code generation, which feature well-defined, verifiable metrics. Extending this offline approach to multi-turn agent interactions, tool use, or open-ended instruction following remains an open challenge due to complex multi-turn distribution shifts.
  • Teacher Lock-in: Because teacher consistency is mandatory, switching to a new teacher model requires completely regenerating the initial SFT dataset. This introduces a resource-intensive one-time cost that partially offsets training-time savings if teachers are changed frequently.

Summary updated

BibTeX
@misc{wu2026lightning,
  author = {Yecheng Wu and Song Han and Hai Cai},
  title = {{Lightning OPD: Efficient Post-Training for Large Reasoning Models with Offline On-Policy Distillation}},
  year = {2026},
  eprint = {2604.13010},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2604.13010},
}
Figure