TL;DR
Lightning Weave is a novel post-training framework that combines independently learned capabilities—such as high reasoning accuracy and inference efficiency—into a single student model. By utilizing a new offline distillation technique called Tilted-Target DOPD, it avoids the massive compute costs of running multiple live teacher models while successfully tracing a state-of-the-art accuracy-efficiency Pareto frontier across complex math and coding benchmarks.
What Problem Does This Paper Address?
Large language models trained for deliberate reasoning (like chain-of-thought models) achieve impressive accuracy but do so at the cost of generating lengthy reasoning traces. This heavily inflates inference costs. Conversely, aggressively forcing a model to shorten its responses often cripples its accuracy by cutting exploration short.
Optimizing a single model for both accuracy and efficiency simultaneously is incredibly difficult because the two objectives demand fundamentally different behaviors. While independent post-training efforts have successfully produced "specialist" models (some optimized for deep reasoning accuracy, others for concise efficiency), combining their strengths remains a challenge. Traditional parameter-space model merging can corrupt internal representations, and standard multi-teacher online distillation requires running several massive models concurrently during training, which is computationally prohibitive for most teams.
Methods
Lightning Weave introduces a practical, offline framework to extract and compose capabilities from independently post-trained specialists into a single student model.
- Anchor Pairs and Policy Shifts: Instead of looking at a specialist model's absolute token probabilities, the authors pair each specialist with its checkpoint before its specific post-training phase. The log-ratio of token probabilities between this "post-anchor" and "pre-anchor" isolates the exact behavioral change (the policy shift) induced by that specific training (e.g., the "accuracy shift" or "efficiency shift").
- Statewise Multi-Anchor Composition: Lightning Weave aligns these shifts in the student's token space and takes a weighted sum of the log-ratios at every shared token state. This allows compatible behaviors to reinforce each other and conflicting behaviors to be resolved locally.
- Tilted-Target DOPD (Direct On-Policy Distillation): Standard offline distillation suffers from a "moving target" problem: as the student model learns and moves away from the initial behavior policy, the cached training signals generate erratic gradients. To fix this, the authors introduce Tilted-Target DOPD, which uses the composed policy shifts to exponentially "tilt" the baseline policy into an explicit, stationary target distribution. This mathematically guarantees that the loss and gradients vanish precisely when the student matches the target, stabilizing offline training.
Because the framework is offline, the anchor pairs only need to score the student's cached trajectories once. Subsequent training only requires the student model and the cached scores, drastically reducing the live compute footprint.
Datasets
The authors evaluated Lightning Weave across separate mathematics and code training settings using the following datasets:
- Training Data:
- Mathematics: 3,200 prompts sampled from the math split of Skywork-OR1-RL-Data.
- Code: 3,200 prompts from KlearReasoner-CodeSub-15K.
- Evaluation Benchmarks:
- Mathematics: AIME 2024, AIME 2025, and HMMT February 2025 (Harvard-MIT Mathematics Tournament).
- Code Generation: LiveCodeBench (LCB) v5 and v6.
Key Insights and Ideas
- Decoupling Composition from Parameters: By operating entirely within the token probability space (log-ratios) rather than merging weights, Lightning Weave bypasses parameter compatibility issues entirely. This allows it to combine capabilities from models with different internal architectures or training histories.
- The Power of Composing Before Tilting: Combining the policy shifts before constructing the final target distribution ensures that all capability sources jointly supervise every single token decision, rather than interleaving different targets across different training examples.
- Controllable Pareto Frontiers: By simply adjusting the weights ($\rho$) assigned to the accuracy vs. efficiency anchor signals during target generation, developers can precisely dial in the desired trade-off, tracing a clean empirical Pareto frontier.
Key Results
The authors tested Lightning Weave across five distinct student model families (including Qwen and OLMo variants), consistently outperforming base models and single-anchor baselines:
- Qwen3.5-4B: Boosted HMMT 2025 accuracy from 59.2% to 64.0% while using 10.7% fewer response tokens. On LiveCodeBench v5, it raised accuracy from 41.7% to 54.2% with 9.6% fewer tokens.
- Qwen3-4B: Increased AIME 2024 accuracy from 72.9% to 76.0% while slashing token consumption by 21.3%.
- Training Efficiency: Lightning Weave reduced measured GPU-hour costs per composition by 1.70× to 2.18× compared to online multi-teacher distillation, proving highly effective at avoiding concurrent anchor model serving.
Limitations and Future Work
- Model Scale: Due to computational constraints, the study focused on models under 10B parameters. It remains to be seen if these exact capability composition benefits scale identically to 70B+ parameter models.
- Dependency on Pre-Checkpoints: The framework strictly requires access to both the post-trained specialist and its exact pre-trained base model (the anchor pair) to isolate the policy shift. If intermediate checkpoints are unreleased, the capability cannot be extracted.
- Pure Efficiency Bounds: While Lightning Weave significantly improves the accuracy-efficiency frontier, its absolute token reduction is slightly lower than models optimized exclusively for efficiency at the expense of accuracy.
Future Directions: The authors plan to scale Lightning Weave to larger model architectures and extend capability composition into agentic reasoning and tool-use domains.
Summary updated