MobileLLM-R2: Advancing On-Device Language Models from Reasoning to Agents

Changsheng Zhao, Ernie Chang, Zechun Liu, Dylan R. Ashley, Matteo Paltenghi, Vikas Chandra, Yangyang Shi, Raghuraman KrishnamoorthiarXiv 2026

TL;DR

We usually think of turning a language model into an "agent"—capable of calling tools and acting autonomously—as a finishing-school trick applied after pre-training. Researchers at Meta AI flip this assumption on its head, showing that a tiny 2.5B-parameter model can crush models nearly triple its size on complex software engineering and math tasks—using 30x fewer training tokens than comparable baselines—if you co-design pre-training and post-training from day one. By building an open, end-to-end recipe, they bring reliable autonomous agents within the tight 3.0 GiB memory budget of your laptop or phone.

What Problem Does This Paper Address?

Right now, the most capable AI agents—models that plan, invoke APIs, and recover from errors—are massive frontier models living on server farms. Bringing this magic to on-device intelligence (where your phone translates a request into coordinated app actions locally, cheaply, and privately) requires shrinking models down to the ~2.5B parameter range.

Historically, people build small agents by grabbing an off-the-shelf pre-trained base model and fine-tuning it on tool-calling trajectories. That implicitly assumes any decent base model can become a great agent given the right post-training. The authors show this isn't true: agentic trainability is path-dependent. Post-training only sharpens behaviors the base model already supports; it can't reliably conjure capabilities out of thin air. Furthermore, small models suffer from fierce "capability competition"—shoving more math data into a 2.5B brain often pushes out general knowledge or coding skills. How do you build a tiny model from scratch that both thinks deeply (math/code) and acts nimbly (multi-turn tool use)?

Methods

The team introduces an end-to-end pipeline spanning pre-training (1.2T tokens), two-phase mid-training (210B tokens), and three-stage post-training, all distilled from a 30B teacher (Muse-Glimmer-30B).

Overall training pipeline of MobileLLM-R2.
  • Recursive Mixture Optimization & Bridge Data: Instead of hand-tuning data ratios, an automated algorithm scores data clusters using $n$-gram overlap to estimate influence on target benchmarks, testing mixes on tiny 500M proxy models. To stop domains from fighting for limited parameters, they generate synthetic cross-domain bridge data—like math problems written as encyclopedic articles, or natural-language code explanations—narrowing the distributional gap between skills.
  • Readiness Monitoring via Sampling Lift: How do you know when pre-training stops helping downstream agentic post-training? They track sampling lift ($\Delta_{16} = \text{pass@16} - \text{pass@1}$), which measures solvable capability hiding outside the model's top guess. A ridge-regression readiness predictor uses zero-shot scores and $\Delta_{16}$ to forecast post-trained tool-use accuracy and halt pre-training when returns plateau.
Data curation and readiness monitoring pipeline.
  • Aligned Post-Training & "Till-End" Rewriting: Post-training combines Supervised Fine-Tuning (SFT) with On-Policy Distillation (OPD, where the student generates rollouts and learns from the teacher's token probabilities). Because OPD fails if the student's habits clash with the teacher's, the authors enforce strict chat-template alignment and rewrite a fraction of SFT data using the teacher. For multi-turn agents, where student actions alter future states, they introduce a Till-End strategy: letting the student act partway, then having the teacher take the wheel from that exact intermediate state to finish the episode.

Datasets

The pipeline relies predominantly on public corpora, filtered and decontaminated from a 15T-token pool:

  • Pre-training & Mid-training: Generic web text (Dolma 3 CC, FineWeb-Edu, DCLM), code/math (StarCoder, Stack-Edu, MegaMath, Nemotron, Dolmino), plus 108B unique tokens of newly synthesized cross-domain bridge data (generated with Llama-3 8B).
  • Post-training: Dolci-Think-SFT-7B, Nemotron-Agentic-v1, OpenMathReasoning, OpenCodeReasoning-2, OpenScienceReasoning-2, OpenThoughts-Agent, and 27K custom synthesized agentic trajectories.
  • Evaluation: No new benchmarks are introduced; models are tested across 20 zero-shot calibration tasks and 14 final benchmarks spanning Math (AIME'24/'25, MATH500, GSM8K), Coding (HumanEval, MBPP, LiveCodeBench), Knowledge (MMLU, GPQA), and Agentic/Out-of-Distribution tool use (SWE-Bench Verified, BFCL V4, Terminal-Bench, Aider Polyglot).

Key Insights and Ideas

  • Code is the ultimate crystal ball for agents: In the readiness predictor, base-model coding scores carried 37.7% of the predictive weight for future tool-use performance—more than double any other domain—likely because code shares the compositional, constraint-driven structure of API calls.
  • Shrinking sampling lift signals diminishing returns: Late in pre-training, pass@1 keeps climbing while pass@16 saturates. Once that gap ($\Delta_{16}$) shrinks, little latent capability remains for post-training to unlock.
  • One tiny brain, two gears: Jointly training on single-turn reasoning and multi-turn agents doesn't cause interference—it actually boosted SWE-Bench accuracy over agent-only training. The 2.5B model naturally shifts gears, writing ~16,700-token monologues for coding puzzles (LCB) vs. crisp 210-token bursts per turn on SWE-Bench.
  • Formatting bugs silently ruin distillation: Minor mismatches in chat templates or behavioral distributions barely dent SFT scores, yet cause catastrophic collapse during On-Policy Distillation (dropping AIME accuracy from 43.4% to 17.1% without alignment, versus jumping to 54.9% when aligned with teacher rewrites).

Key Results

Trained on just 1.2T pre-training tokens (under 2T total—roughly 9x fewer than SmolLM3-3B and 30x fewer than Qwen3-1.7B) and requiring 3.0 GiB of memory quantized on an Apple M4 Max, MobileLLM-R2-2.5B punches way above its weight class:

Performance comparison across reasoning, coding, and agentic benchmarks.
  • Software Engineering & Agents: Achieves 30.9% on SWE-Bench Verified, beating every evaluated model up to 7.3B parameters and doubling the runner-up (Qwen3.5-2B at 15.6%) by +15.3 percentage points. It also leads all models on out-of-distribution Terminal-Bench (5.2%) and Aider Polyglot (6.5%).
  • Math & Coding: Tops all evaluated models—including the 3x larger OLMo-3-7B-Instruct—on AIME'24 (59.4%) and LiveCodeBench (47.3%), while hitting 91.9% on GSM8K and 69.5% on HumanEval.
  • Bridge Data Gains: Adding synthetic bridge data improved all 19 evaluated zero-shot benchmarks by an average of +1.27 percentage points.

Limitations and Future Work

The authors note an intriguing disconnect in their data curation loop: candidate pre-training mixtures were ranked using equal weights across capability categories, whereas their readiness predictor later revealed that domains like code matter far more than others for downstream agentic potential. Weighting early data-mixture selection directly by those learned predictor weights ($\psi$) is left as a natural next step for future work.

Summary updated

BibTeX
@misc{zhao2026mobilellm,
  author = {Changsheng Zhao and Ernie Chang and Zechun Liu and Dylan R. Ashley and Matteo Paltenghi and Vikas Chandra and Yangyang Shi and Raghuraman Krishnamoorthi},
  title = {{MobileLLM-R2: Advancing On-Device Language Models from Reasoning to Agents}},
  year = {2026},
  eprint = {2611.39870},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.39870},
}
Figure