---
title: MobileLLM-R2-2.5B-base
canonical_url: "https://www.modelscope.cn/models/facebook/MobileLLM-R2-2.5B-base"
md_url: "https://www.modelscope.cn/models/facebook/MobileLLM-R2-2.5B-base.md"
repository: facebook/MobileLLM-R2-2.5B-base
last_updated: 2026-12-01
license: other
parameters: 2.5B
tensor_type:
  - BF16
downloads: 41
stars: 0
---

# MobileLLM-R2-2.5B-base

> MobileLLM-R2-2.5B-base - facebook 在 ModelScope 开源的模型。🤗 Hugging Face | 🌐 Project page

facebook/MobileLLM-R2-2.5B-base 是 ModelScope 魔搭社区上的 2.5B 参数机器学习模型，采用 other 许可。

- **Repository**: facebook/MobileLLM-R2-2.5B-base
- **License**: other
- **Parameters**: 2.5B
- **Downloads**: 41
- **Stars**: 0
- **Last updated**: 2026-12-01

Source: https://www.modelscope.cn/models/facebook/MobileLLM-R2-2.5B-base

---

<p align="center">
  <img src="https://github.com/user-attachments/assets/b1f6cc52-7fbf-4870-aed5-21e066fbd792" width="30%" />
</p>

🤗 [Hugging Face](https://huggingface.co/collections/facebook/mobilellm-r2-6b0dff6da185140fdaf1fc3a) | 🌐 [Project page](https://facebookresearch.github.io/MobileLLM/R2/)

# Model Details

We present MobileLLM-R2, the latest 2.5B-parameter model in the MobileLLM family. Trained on 1.2T pre-training tokens and fewer than 2T tokens in total, MobileLLM-R2 supports both long-horizon reasoning and multi-turn agentic tool use. This release includes:

Base model:
- [MobileLLM-R2-2.5B-base](https://huggingface.co/facebook/MobileLLM-R2-2.5B-base/)

Final model:
- [MobileLLM-R2-2.5B](https://huggingface.co/facebook/MobileLLM-R2-2.5B/)
- [MobileLLM-R2-2.5B-GGUF](https://huggingface.co/facebook/MobileLLM-R2-2.5B-GGUF/) (llama.cpp)

In addition to the models, we release the complete training recipe and intermediate checkpoints to facilitate further research on efficient and reproducible agentic model training.

## Intermediate checkpoints

| [Pre-training](https://huggingface.co/facebook/MobileLLM-R2-2.5B-base/tree/MobileLLM-R2-2.5B-pretrain) | [Mid-training Phase 1](https://huggingface.co/facebook/MobileLLM-R2-2.5B-base/tree/MobileLLM-R2-2.5B-midtrain-stage1) | [Mid-training Phase 2](https://huggingface.co/facebook/MobileLLM-R2-2.5B-base) | [General SFT](https://huggingface.co/facebook/MobileLLM-R2-2.5B/tree/MobileLLM-R2-2.5B-sft-stage-1) | [Agentic Reasoning SFT](https://huggingface.co/facebook/MobileLLM-R2-2.5B/tree/MobileLLM-R2-2.5B-sft) | [On-policy Distillation](https://huggingface.co/facebook/MobileLLM-R2-2.5B) |
|---|---|---|---|---|---|

## Highlights
- **Agentic coding at 2.5B parameters:** 30.9% on SWE-Bench Verified, 15.3 points above the strongest baseline, Qwen3.5-2B (15.6%).
- **Reasoning and coding:** the best AIME'24 (59.4%) and LiveCodeBench (47.3%) scores of all seven models compared.
- **Token efficiency:** 1.2T pre-training tokens, 9.3× fewer than SmolLM3-3B and 30× fewer than the Qwen3 family.
- **On-policy distillation:** the final stage adds 9.6 points on AIME'24, 8.7 on LiveCodeBench and 5.9 on SWE-Bench Verified over the SFT model.
- **On device:** 3.0 GiB of memory at a 32K context with Q4_K_M weights and an 8-bit KV cache, suggesting memory feasibility on commodity mobile devices.

![Performance comparison across reasoning, coding and agentic benchmarks](https://facebookresearch.github.io/MobileLLM/R2/static/images/teaser_overall_acc.svg)

*With only 2.5B parameters and 1.2T pre-training tokens, MobileLLM-R2 outperforms OLMo-3-7B-Instruct (7.3B parameters, 5.9T pre-training tokens) on five of the six benchmarks shown, spanning mathematical reasoning, coding, and agentic tasks.*

## News
- Nov 30, 2026: 🚀 MobileLLM-R2 models are released on [HuggingFace](https://huggingface.co/collections/facebook/mobilellm-r2-6b0dff6da185140fdaf1fc3a).
- Nov 24, 2025: 🔥 MobileLLM-R1.5 models are available on [HuggingFace](https://huggingface.co/collections/facebook/mobilellm-r1-68c4597b104fac45f28f448e).
- Sept 29, 2025: 🎉 The technical report "[MobileLLM-R1: Exploring the Limits of Sub-Billion Language Model Reasoners with Open Training Recipes](https://arxiv.org/pdf/2509.24945)" is available.
- Sept 28, 2025: 🌟 The MobileLLM-R1 training code is available on [GitHub](https://github.com/facebookresearch/MobileLLM-R1).
- Sept 12, 2025: 🚀 MobileLLM-R1 models are released on [HuggingFace](https://huggingface.co/collections/facebook/mobilellm-r1-68c4597b104fac45f28f448e).

**Model Architecture**:

|  | # Layers | # Attention Heads | # KV Heads | Dim | Hidden Dim | Params |
|---|---|---|---|---|---|---|
| MobileLLM-R2-2.5B | 32 | 32 | 8 | 2048 | 8192 | 2.49B |

|  | Input modalities | Output modalities | Context Length | Vocabulary Size | Shared Embeddings |
|---|---|---|---|---|---|
| [MobileLLM-R2-2.5B-base](https://huggingface.co/facebook/MobileLLM-R2-2.5B-base) | Text | Text | 16k | 202k | Yes |
| [MobileLLM-R2-2.5B](https://huggingface.co/facebook/MobileLLM-R2-2.5B) | Text | Text | 32k | 202k | Yes |

Our architecture builds upon the designs of MobileLLM and Muse-Glimmer-30B. We adopt the Muse-Glimmer tokenizer, which has a 202,048-token subword vocabulary, together with SwiGLU activations and RoPE with θ = 10<sup>7</sup>, and we share the input and output embedding weights.

## Demo: a local coding agent

MobileLLM-R2 runs as a coding agent on a laptop with llama.cpp. We ran two agent harnesses, Terminus-2 and Claude Code, on tasks from a [100-task sample](https://huggingface.co/datasets/DCAgent2/swebench-verified-sample-100) of SWE-bench Verified, with the [Q8_0 GGUF file](https://huggingface.co/facebook/MobileLLM-R2-2.5B-GGUF/blob/main/MobileLLM-R2-Q8_0.gguf) and each task in a container without network access. These replays show runs whose fix passed the task's SWE-bench tests.

![Replay: MobileLLM-R2 Q8_0 fixing django__django-13410 in Terminus-2](https://facebookresearch.github.io/MobileLLM/R2/static/images/terminus-django__django-13410.svg)

![Replay: MobileLLM-R2 Q8_0 fixing django__django-11066 in Claude Code](https://facebookresearch.github.io/MobileLLM/R2/static/images/claude-code-django__django-11066.svg)

- **Full replay:** [eight solved runs](https://facebookresearch.github.io/MobileLLM/R2/swe_replay.html) on one page, which also works offline once saved.
- **Run it yourself:** the [GGUF model card](https://huggingface.co/facebook/MobileLLM-R2-2.5B-GGUF) has the setup for both harnesses.
- **Claude Code:** the run goes through a small adapter that repairs mechanical tool-call mistakes. It is provided as a demo only, and its code will be released with our open-source code on GitHub. Anthropic does not support using Claude Code with models other than Claude.

# How to use

The model code ships with the checkpoint, so pass `trust_remote_code=True` to both the tokenizer and the model:

```python
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("facebook/MobileLLM-R2-2.5B", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("facebook/MobileLLM-R2-2.5B", dtype=torch.bfloat16, trust_remote_code=True)
```

# Inference examples

Transformers

```python
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "facebook/MobileLLM-R2-2.5B"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    model_id, dtype=torch.bfloat16, trust_remote_code=True
).to("cuda")

# Math problem / default scenario (reasoning strength "high" by default)
messages = [{"role": "user", "content": "Compute: $1-2+3-4+5- \\dots +99-100$."}]
inputs = tokenizer.apply_chat_template(
    messages, add_generation_prompt=True, return_tensors="pt", return_dict=True
).to("cuda")

# Tool calling / agentic scenario: low reasoning strength, as in the agentic training data
tools = [{"type": "function", "function": {"name": "get_weather",
    "description": "Get the current weather for a city.",
    "parameters": {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]}}}]
messages = [{"role": "user", "content": "What is the weather like in Paris right now?"}]
inputs = tokenizer.apply_chat_template(
    messages, tools=tools, reasoning_strength="low",
    add_generation_prompt=True, return_tensors="pt", return_dict=True
).to("cuda")

out = model.generate(**inputs, max_new_tokens=30000)  # sampling defaults: temperature 0.6, top-p 0.95, top-k 20
print(tokenizer.decode(out[0, inputs["input_ids"].shape[1]:], skip_special_tokens=False))
```

You can also serve it with stock vLLM 0.28 or newer, whose built-in `muse_glimmer` parsers return OpenAI-style `tool_calls` (on vLLM 0.17 to 0.27, install `vllm_plugin/` from the repository):

```bash
vllm serve facebook/MobileLLM-R2-2.5B --trust-remote-code \
    --enable-auto-tool-choice --tool-call-parser muse_glimmer --reasoning-parser muse_glimmer
```

For llama.cpp (b11671 or later): `llama-server -m MobileLLM-R2-Q4_K_M.gguf --jinja --swa-full -c 32768`.

# Evaluation

## MobileLLM-R2 base model

| Model | MATH500 | GSM8K | MBPP | HumanEval | CommonSense | MMLU | WikiText-2 (↓) |
|---|---|---|---|---|---|---|---|
|  | 4-shot em | 8-shot em | 3-shot pass@1 | 0-shot pass@1 | 0-shot accuracy | 5-shot accuracy | perplexity |
| **MobileLLM-R2-2.5B-base** | 45.0 | 88.9 | 54.2 | 43.9 | 56.7 | 54.4 | 15.75 |

## MobileLLM-R2 post-trained model

| Category | Benchmark | **MobileLLM-R2-2.5B** | MobileLLM-R1.5-950M | Qwen3.5-2B | SmolLM3-3B | Nemotron-3-Nano-4B | Gemma-4-E2B | Olmo-3-7B |
|---|---|---|---|---|---|---|---|---|
|  | Size | 2.50B | 0.95B | 2.27B | 3.08B | 3.97B | 2.00B / 5.12B | 7.30B |
| Math | AIME24 (avg@16) | **<u>59.4</u>** | 39.8 | 13.3 | 46.7 | 58.5 | 48.1 | 54.8 |
|  | AIME25 (avg@16) | **49.0** | 31.0 | 16.5 | 37.7 | <u>56.5</u> | 36.0 | 42.3 |
|  | MATH500 | **91.0** | 86.6 | 67.8 | **91.8** | 91.4 | 77.4 | <u>92.0</u> |
|  | GSM8K | **91.9** | 83.7 | 76.2 | 88.0 | 87.2 | 90.1 | <u>93.3</u> |
| Knowledge | MMLU | 56.5 | 37.4 | **<u>65.9</u>** | 63.2 | 65.8 | 58.1 | 63.4 |
|  | GPQA-Diamond | 45.2 | 29.3 | **51.5** | 41.4 | <u>61.1</u> | 44.4 | 41.9 |
| Coding | HumanEval | **69.5** | 11.6 | 36.0 | 54.3 | <u>72.0</u> | 67.1 | 47.6 |
|  | MBPP | **49.6** | 5.6 | 23.2 | **<u>50.0</u>** | 45.8 | 47.4 | 39.2 |
|  | LiveCodeBench v6 | **<u>47.3</u>** | 29.1 | 12.6 | 28.8 | 45.3 | 44.8 | 21.8 |
| Agentic | BFCL V4 | **50.6** | 10.2 | 48.9 | 25.7 | <u>53.8</u> | 41.9 | 31.8 |
|  | SWE-Bench Verified | **<u>30.9</u>** | 0.0 | 15.6 | 0.0 | 7.3 | 1.1 | 0.6 |
| OOD | Terminal-Bench 2.0 | **<u>5.2</u>** | 0.0 | 4.1 | 0.4 | 2.6 | 1.9 | 1.1 |
|  | Aider Polyglot | **<u>6.5</u>** | 2.7 | 3.7 | 2.5 | 5.0 | 3.7 | 2.1 |
|  | BFCL-Parity | **77.5** | 0.0 | 30.1 | 70.2 | 68.0 | <u>84.0</u> | 69.4 |

<sub>**Bold**: within 1.0 point of the best among models under 3.5B total parameters. <u>Underline</u>: best of all models.</sub>

## Quantized models (GGUF)

[MobileLLM-R2-2.5B-GGUF](https://huggingface.co/facebook/MobileLLM-R2-2.5B-GGUF/) provides BF16 and five quantizations from 1.5 to 5.0 GB. These files, in `dense/`, run on llama.cpp built with the small patch in that folder; on an Apple M4 Max laptop, Q4_K_M with an 8-bit KV cache decodes 137 tokens/s at a 4K context.

| Quantization | Size (GB) | Perplexity | vs BF16 |
|---|---|---|---|
| BF16 | 5.00 | 15.61 | reference |
| Q8_0 | 2.67 | 15.64 | +0.2% |
| Q6_K | 2.09 | 15.64 | +0.2% |
| Q5_K_M | 1.87 | 15.76 | +1.0% |
| Q4_K_M | 1.67 | 16.17 | +3.6% |
| IQ4_XS | 1.54 | 16.37 | +4.9% |

Perplexity is measured with `llama-perplexity` on the full WikiText-2 test set at a 512-token context.

# Training

## Training Process

![Overall training pipeline of MobileLLM-R2](https://facebookresearch.github.io/MobileLLM/R2/static/images/training_pipeline.svg)

MobileLLM-R2 is pre-trained on 1.2T tokens selected from a pool of over 15T raw tokens from 194 sources, mid-trained in two phases, the second with more math and code, and post-trained in three stages: general SFT, agentic reasoning SFT, and on-policy knowledge distillation (OPD).

### Training stages and hyperparameter details

In pre-training, the model is optimized with Muon at a peak learning rate of 1.2×10<sup>-3</sup> and a weight decay of 0.1, on a cosine schedule with 7,500 warmup steps, with online knowledge distillation from Muse-Glimmer-30B (forward KL, no hard-label loss).

In mid-training, two 50,000-step distillation phases from Muse-Glimmer-30B each decay the learning rate linearly to zero; the share of math and code rises from 15.1% and 27.6% in Phase 1 to 49.0% and 39.2% in Phase 2.

In post-training, both SFT stages use Muon with a cosine schedule (10% warmup) and zero weight decay. OPD samples one student rollout per prompt (temperature 0.6, top-p 0.95, up to 30,000 tokens) and minimizes the forward KL from the teacher over the full vocabulary.

| Stage | Phase | Tokens / Samples | Batch Size | Sequence Length | Updates / Epochs | Peak LR | #GPUs |
|---|---|---|---|---|---|---|---|
| Pre-training | Single phase | 1.2T tokens | 128 | 16k | 600k | 1.2e-3 | 32 x 8 |
| Mid-training | Phase 1 | 105B tokens | 128 | 16k | 50k | 3.63e-4 | 16 x 8 |
|  | Phase 2 | 105B tokens | 128 | 16k | 50k | 3.63e-4 | 16 x 8 |
| Post-training | General SFT | 2.4M samples | 1024 | 32k | 2 epochs | 8e-5 | 16 x 8 |
|  | Agentic Reasoning SFT | 8.8M samples | 1024 | 32k | 1 epoch | 4e-5 | 16 x 8 |
|  | OPD | 812K samples | 1024 | 32k | 1 epoch | 5e-6 | 16 x 8 |

## Data Mix

### Pre-training

| Dataset | Subset | Mix Ratio |
|---|---|---|
| [FineWeb-Edu](https://huggingface.co/datasets/HuggingFaceFW/fineweb-edu) | v1.4.0 | 0.86% |
| [Dolma 3](https://huggingface.co/datasets/allenai/dolma3_mix-6T-1025-7B) | Common Crawl | 57.84% |
|  | Stack Edu | 2.95% |
|  | olmOCR Science | 10.28% |
|  | ProofPile Arxiv | 0.31% |
|  | Wiki | 0.79% |
| [Dolma](https://huggingface.co/datasets/allenai/dolma) | FLAN | 0.58% |
| [DCLM](https://huggingface.co/datasets/mlfoundations/dclm-baseline-1.0) | Baseline | 0.51% |
| [MegaMath](https://huggingface.co/datasets/IFM/MegaMath) | [Text and code blocks](https://huggingface.co/datasets/IFM/MegaMath/tree/main/megamath-text-code-block) | 0.69% |
|  | [Translated code](https://huggingface.co/datasets/IFM/MegaMath/tree/main/megamath-translated-code) | 0.27% |
|  | [QA](https://huggingface.co/datasets/IFM/MegaMath/tree/main/megamath-qa) | 0.98% |
|  | [Web Pro](https://huggingface.co/datasets/IFM/MegaMath/tree/main/megamath-web-pro) | 0.73% |
| [Nemotron](https://huggingface.co/datasets/nvidia/Llama-Nemotron-Post-Training-Dataset) | [Code](https://huggingface.co/datasets/nvidia/Llama-Nemotron-Post-Training-Dataset/blob/main/SFT/code/code_v1.1.jsonl) | 0.51% |
|  | [Math](https://huggingface.co/datasets/nvidia/Llama-Nemotron-Post-Training-Dataset/blob/main/SFT/math/math_v1.1.jsonl) | 0.95% |
|  | [Science](https://huggingface.co/datasets/nvidia/Llama-Nemotron-Post-Training-Dataset/blob/main/SFT/science/science.jsonl) | 0.55% |
| [FineMath](https://huggingface.co/datasets/HuggingFaceTB/finemath) | Base and subsets | 0.33% |
| [OpenWebMath](https://huggingface.co/datasets/open-web-math/open-web-math) | Proof-Pile 2 | 0.34% |
| [Algebraic Stack](https://huggingface.co/datasets/EleutherAI/proof-pile-2/tree/main/algebraic-stack) | Proof-Pile 2 | 0.31% |
| [Arxiv](https://huggingface.co/datasets/togethercomputer/RedPajama-Data-1T/blob/main/urls/arxiv.txt) | Arxiv | 0.80% |
| [StackExchange](https://data.together.xyz/redpajama-data-1T/v1.0.0/stackexchange/stackexchange.jsonl) | StackExchange | 0.29% |
| [Wiki](https://huggingface.co/datasets/allenai/dolmino-mix-1124/tree/main/data/wiki) | English | 0.46% |
| [Natural Reasoning](https://huggingface.co/datasets/facebook/natural_reasoning) | -- | 0.73% |
| [Cosmopedia](https://huggingface.co/datasets/HuggingFaceTB/cosmopedia) | SmolLM | 0.27% |
| Bridge data | Synthetic cross-domain | 15.78% |
| Others | -- | 1.89% |
| **Total** |  | **100.00%** |

### Mid-training

| Dataset | Subset | Rows (M) | Phase1 Mix Ratio | Phase2 Mix Ratio |
|---|---|---|---|---|
| [Dolmino](https://huggingface.co/datasets/allenai/dolmino-mix-1124) | DCLM Baseline | 606 | 37.03% | 6.58% |
|  | FLAN | 57.3 | 4.10% | 0.73% |
|  | peS2o | 38.8 | 11.41% | 2.03% |
|  | Wiki | 6.17 | 2.66% | 0.47% |
|  | StackExchange | 2.48 | 2.12% | 2.02% |
|  | Math | 21 | 11.63% | 29.39% |
| [Nemotron](https://huggingface.co/datasets/nvidia/Llama-Nemotron-Post-Training-Dataset) | [Code (SFT)](https://huggingface.co/datasets/nvidia/Llama-Nemotron-Post-Training-Dataset/tree/main/SFT/code) | 10.1 | 5.69% | 8.08% |
|  | [Math (SFT)](https://huggingface.co/datasets/nvidia/Llama-Nemotron-Post-Training-Dataset/tree/main/SFT/math) | 22.1 | 3.45% | 19.59% |
| StarCoder | [StarCoder](https://huggingface.co/datasets/bigcode/starcoderdata) | 206 | 6.90% | 9.80% |
| Dolma 3 | [Stack-Edu (Python, C++, C, JavaScript)](https://huggingface.co/datasets/allenai/dolma3_mix-6T-1025-7B) | 526 | 15.00% | 21.31% |
| **Total** |  |  | **100.00%** | **100.00%** |

### Post-training

| Phase | Objective | Dataset | Data Type | Rows | Repeat | Epochs | Teacher-rewritten |
|---|---|---|---|---|---|---|---|
| General SFT | CE | [Dolci-Think-SFT-7B](https://huggingface.co/datasets/allenai/Dolci-Think-SFT-7B) | General Reasoning | 2.3M | 1× | 2 | 0% |
|  |  | [Nemotron-Agentic-v1](https://huggingface.co/datasets/nvidia/Nemotron-Agentic-v1) | Agentic | 100K | 1× | 2 | 0% |
| Agentic Reasoning SFT | CE | [OpenMathReasoning](https://huggingface.co/datasets/nvidia/OpenMathReasoning) (CoT) | Math Reasoning | 3.2M | 1× | 1 | 25.0% |
|  |  | [OpenCodeReasoning-2](https://huggingface.co/datasets/nvidia/OpenCodeReasoning-2) | Code Reasoning | 2.6M | 1× | 1 | 12.9% |
|  |  | [OpenScienceReasoning-2](https://huggingface.co/datasets/nvidia/OpenScienceReasoning-2) | Science Reasoning | 1.6M | 1× | 1 | 24.8% |
|  |  | [OpenThoughts-Agent-SFT](https://huggingface.co/datasets/open-thoughts/OpenThoughts-Agent-SFT-100K) | Agentic | 94K | 14× | 1 | 5.0% |
|  |  | Synthesized Agentic Data | Agentic | 27K | 3× | 1 | 0% |
| OPD | KL | OpenMathReasoning | Math Reasoning | 561K | 1× | 1 | -- |
|  |  | OpenCodeReasoning-2 | Code Reasoning | 184K | 1× | 1 | -- |
|  |  | OpenThoughts-Agent | Agentic | 66K | 1× | 1 | -- |

# Citation

If you find our model useful for your research, please consider citing:

```
@article{zhao2026mobilellm-r2,
  title={MobileLLM-R2: Advancing On-Device Language Models from Reasoning to Agents},
  author={Zhao, Changsheng and Chang, Ernie and Liu, Zechun and Ashley, Dylan R. and Paltenghi, Matteo and Chandra, Vikas and Shi, Yangyang and Krishnamoorthi, Raghuraman},
  journal={arXiv preprint arXiv:2611.39870},
  year={2026}
}

@inproceedings{zhao2026mobilellm-r1,
  title={Mobilellm-r1: Exploring the limits of sub-billion language model reasoners with open training recipes},
  author={Zhao, Changsheng and Chang, Ernie and Liu, Zechun and Chang, Chia-Jung and Wen, Wei and Lai, Chen and Cao, Sheng and Tian, Yuandong and Krishnamoorthi, Raghuraman and Shi, Yangyang and others},
  booktitle={International Conference on Learning Representations},
  volume={2026},
  pages={121936--121955},
  year={2026}
}
```

# Contact

Changsheng Zhao, Meta Inc (cszhao at meta dot com)

Ernie Chang, Meta Inc (erniecyc at meta dot com)

Zechun Liu, Meta Inc (zechunliu at meta dot com)

# License

MobileLLM-R2 is released under the FAIR Noncommercial Research License; see [LICENSE](https://huggingface.co/facebook/MobileLLM-R2-2.5B/blob/main/LICENSE).
