Text Generation
Transformers
Safetensors
English
moeloop
looptitan
mixture-of-experts
Mixture of Experts
custom_code
muon
conversational
Eval Results (legacy)
Instructions to use NaturalScale/LoopTitan-Base-1.3B-A0.2B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NaturalScale/LoopTitan-Base-1.3B-A0.2B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NaturalScale/LoopTitan-Base-1.3B-A0.2B", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("NaturalScale/LoopTitan-Base-1.3B-A0.2B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use NaturalScale/LoopTitan-Base-1.3B-A0.2B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NaturalScale/LoopTitan-Base-1.3B-A0.2B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NaturalScale/LoopTitan-Base-1.3B-A0.2B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/NaturalScale/LoopTitan-Base-1.3B-A0.2B
- SGLang
How to use NaturalScale/LoopTitan-Base-1.3B-A0.2B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "NaturalScale/LoopTitan-Base-1.3B-A0.2B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NaturalScale/LoopTitan-Base-1.3B-A0.2B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "NaturalScale/LoopTitan-Base-1.3B-A0.2B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NaturalScale/LoopTitan-Base-1.3B-A0.2B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use NaturalScale/LoopTitan-Base-1.3B-A0.2B with Docker Model Runner:
docker model run hf.co/NaturalScale/LoopTitan-Base-1.3B-A0.2B
File size: 11,644 Bytes
7368f62 78aaa10 7368f62 de04b98 7368f62 78aaa10 7368f62 78aaa10 7368f62 78aaa10 7368f62 78aaa10 2ba81ae 7368f62 78aaa10 c3eddd0 2ba81ae 7368f62 de04b98 7368f62 c3eddd0 7368f62 78aaa10 de04b98 7368f62 cbad87e 7368f62 de04b98 c3eddd0 cbad87e 7368f62 cbad87e 7368f62 cbad87e 7368f62 2ba81ae 7368f62 de04b98 c3eddd0 7368f62 c3eddd0 7368f62 c3eddd0 de04b98 7368f62 c3eddd0 7368f62 539405d 7368f62 c3eddd0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | ---
license: mit
library_name: transformers
pipeline_tag: text-generation
language:
- en
tags:
- "looptitan"
- "mixture-of-experts"
- "moe"
- "custom_code"
- "muon"
datasets:
- "mlfoundations/dclm-baseline-1.0-parquet"
model-index:
- name: "LoopTitan-Base-1.3B-A0.2B"
results:
- task:
type: text-generation
name: Language modeling
dataset:
name: "mlfoundations/dclm-baseline-1.0-parquet (held-out splits)"
type: "mlfoundations/dclm-baseline-1.0-parquet"
revision: "817d6752765f6a41261085171dd546b104f60626"
metrics:
- name: Test BPB
type: bpb
value: 0.970165
- name: Validation BPB
type: bpb
value: 0.971959
source:
name: "LoopTitan Phase 1 results"
url: https://datamllab.github.io/LoopTitan/docs/results/phase1/
---
<div class="hidden md:block"><p align="center"><img class="not-prose dark:hidden" src="assets/banner-light.svg" width="720" alt="MoE, 18 layers"><img class="not-prose hidden dark:block" src="assets/banner-dark.svg" width="720" alt="MoE, 18 layers"></p></div>
<div class="md:hidden"><p align="center"><img class="not-prose dark:hidden" src="assets/banner-light-narrow.svg" width="360" alt="MoE, 18 layers"><img class="not-prose hidden dark:block" src="assets/banner-dark-narrow.svg" width="360" alt="MoE, 18 layers"></p></div>
<p align="center" class="not-prose dark:hidden" style="margin:1.5em 0"><a href="https://datamllab.github.io/LoopTitan/"><img class="not-prose inline-block" src="assets/capsule-homepage-light.svg" height="32" alt="Homepage"></a><a href="https://github.com/datamllab/LoopTitan"><img class="not-prose inline-block" src="assets/capsule-code-light.svg" height="32" alt="Code"></a><a href="https://datamllab.github.io/LoopTitan/docs/"><img class="not-prose inline-block" src="assets/capsule-docs-light.svg" height="32" alt="Documentation"></a><a href="https://huggingface.co/collections/NaturalScale/looptitan-phase-1-6afb1e0dbc400210b5b0a5eb"><img class="not-prose inline-block" src="assets/capsule-models-light.svg" height="32" alt="Models"></a><a href="https://arxiv.org/abs/2611.34821"><img class="not-prose inline-block" src="assets/capsule-paper-light.svg" height="32" alt="Paper"></a><a href="https://datamllab.github.io/LoopTitan/docs/results/phase1/"><img class="not-prose inline-block" src="assets/capsule-results-light.svg" height="32" alt="Results"></a></p>
<p align="center" class="not-prose hidden dark:block" style="margin:1.5em 0"><a href="https://datamllab.github.io/LoopTitan/"><img class="not-prose inline-block" src="assets/capsule-homepage-dark.svg" height="32" alt="Homepage"></a><a href="https://github.com/datamllab/LoopTitan"><img class="not-prose inline-block" src="assets/capsule-code-dark.svg" height="32" alt="Code"></a><a href="https://datamllab.github.io/LoopTitan/docs/"><img class="not-prose inline-block" src="assets/capsule-docs-dark.svg" height="32" alt="Documentation"></a><a href="https://huggingface.co/collections/NaturalScale/looptitan-phase-1-6afb1e0dbc400210b5b0a5eb"><img class="not-prose inline-block" src="assets/capsule-models-dark.svg" height="32" alt="Models"></a><a href="https://arxiv.org/abs/2611.34821"><img class="not-prose inline-block" src="assets/capsule-paper-dark.svg" height="32" alt="Paper"></a><a href="https://datamllab.github.io/LoopTitan/docs/results/phase1/"><img class="not-prose inline-block" src="assets/capsule-results-dark.svg" height="32" alt="Results"></a></p>
# LoopTitan-Base-1.3B-A0.2B
**Muon** · LoopTitan Phase 1 · design 3 of 8, each trained with AdamW and with Muon
A mixture-of-experts (MoE) language model with 1.3B non-embedding parameters and 0.2B active per token, trained from scratch on 5.0B tokens of DCLM with Muon for the paper [LoopTitan: What Does Parameter Revisit Buy a Mixture-of-Experts?](https://arxiv.org/abs/2611.34821). A base model, not instruction tuned.
Deeper and narrower: 18 layers at width 1056, 58 experts per layer, expert hidden size 384, top-8. In the paper: LoopTitan-Base (MoE-18).
1.31B parameters stored without embeddings, 1.63B with the input embedding and output head (the count Hugging Face shows), 0.22B active per token.
## Results
| Test BPB | Validation BPB | Δ test vs standard MoE (Muon) |
|---:|---:|---:|
| 0.970165 | 0.971959 | -4.21 mBPB |
<div class="hidden md:block"><p align="center"><img class="not-prose dark:hidden" src="assets/standing-light.svg" width="720" alt="Test mBPB of the 8 designs of this release against the standard MoE, by optimizer: Standard MoE: AdamW +0.0, Muon +0.0; Finer experts: AdamW -4.2, Muon -0.9; Deeper, narrower: AdamW -6.9, Muon -4.2; Expert layout: AdamW -5.9, Muon -3.4; Unrolled: AdamW -8.9, Muon -3.3; The loop: AdamW -9.0, Muon -3.7; One more visit: AdamW -14.8, Muon -12.2; Twice the experts: AdamW -14.3, Muon -9.9."><img class="not-prose hidden dark:block" src="assets/standing-dark.svg" width="720" alt="Test mBPB of the 8 designs of this release against the standard MoE, by optimizer: Standard MoE: AdamW +0.0, Muon +0.0; Finer experts: AdamW -4.2, Muon -0.9; Deeper, narrower: AdamW -6.9, Muon -4.2; Expert layout: AdamW -5.9, Muon -3.4; Unrolled: AdamW -8.9, Muon -3.3; The loop: AdamW -9.0, Muon -3.7; One more visit: AdamW -14.8, Muon -12.2; Twice the experts: AdamW -14.3, Muon -9.9."></p></div>
<div class="md:hidden"><p align="center"><img class="not-prose dark:hidden" src="assets/standing-light-narrow.svg" width="360" alt="Test mBPB of the 8 designs of this release against the standard MoE, by optimizer: Standard MoE: AdamW +0.0, Muon +0.0; Finer experts: AdamW -4.2, Muon -0.9; Deeper, narrower: AdamW -6.9, Muon -4.2; Expert layout: AdamW -5.9, Muon -3.4; Unrolled: AdamW -8.9, Muon -3.3; The loop: AdamW -9.0, Muon -3.7; One more visit: AdamW -14.8, Muon -12.2; Twice the experts: AdamW -14.3, Muon -9.9."><img class="not-prose hidden dark:block" src="assets/standing-dark-narrow.svg" width="360" alt="Test mBPB of the 8 designs of this release against the standard MoE, by optimizer: Standard MoE: AdamW +0.0, Muon +0.0; Finer experts: AdamW -4.2, Muon -0.9; Deeper, narrower: AdamW -6.9, Muon -4.2; Expert layout: AdamW -5.9, Muon -3.4; Unrolled: AdamW -8.9, Muon -3.3; The loop: AdamW -9.0, Muon -3.7; One more visit: AdamW -14.8, Muon -12.2; Twice the experts: AdamW -14.3, Muon -9.9."></p></div>
Bits per byte on the complete held-out test and validation splits after the last update; lower is better. The standard MoE is [`recipes/phase1/m0-muon.json`](https://github.com/datamllab/LoopTitan/blob/main/recipes/phase1/m0-muon.json); 1 mBPB is 0.001 BPB.
## Budgets
Matched budgets: all three within 5% of the standard MoE (Muon).
<div class="hidden md:block"><p align="center"><img class="not-prose dark:hidden" src="assets/budgets-light.svg" width="720" alt="Budgets against the standard MoE (Muon): unique non-embedding parameters -0.27%, training FLOPs per token +2.33%, KV cache +3.12%; tolerance ±5%"><img class="not-prose hidden dark:block" src="assets/budgets-dark.svg" width="720" alt="Budgets against the standard MoE (Muon): unique non-embedding parameters -0.27%, training FLOPs per token +2.33%, KV cache +3.12%; tolerance ±5%"></p></div>
<div class="md:hidden"><p align="center"><img class="not-prose dark:hidden" src="assets/budgets-light-narrow.svg" width="360" alt="Budgets against the standard MoE (Muon): unique non-embedding parameters -0.27%, training FLOPs per token +2.33%, KV cache +3.12%; tolerance ±5%"><img class="not-prose hidden dark:block" src="assets/budgets-dark-narrow.svg" width="360" alt="Budgets against the standard MoE (Muon): unique non-embedding parameters -0.27%, training FLOPs per token +2.33%, KV cache +3.12%; tolerance ±5%"></p></div>
## Training
5.0B tokens of [mlfoundations/dclm-baseline-1.0-parquet](https://huggingface.co/datasets/mlfoundations/dclm-baseline-1.0-parquet) at revision `817d6752765f6a41261085171dd546b104f60626` (CC-BY-4.0): 4,769 updates of 1,048,576 tokens in sequences of 4,096, warmup-stable-decay schedule, seed 42. Muon at learning rate 1.7e-3, inherited from the standard MoE, where it was tuned once per optimizer ([#180](https://github.com/datamllab/LoopTitan/issues/180)). The full protocol: [results page](https://datamllab.github.io/LoopTitan/docs/results/phase1/). Configuration: [`recipes/shape/u-muon.json`](https://github.com/datamllab/LoopTitan/blob/main/recipes/shape/u-muon.json); run record: [#218](https://github.com/datamllab/LoopTitan/issues/218).
## Use
```python
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "NaturalScale/LoopTitan-Base-1.3B-A0.2B"
tokenizer = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True).eval()
ids = torch.tensor([[tokenizer.bos_token_id] + tokenizer.encode("The model", add_special_tokens=False)])
out = model.generate(ids, attention_mask=torch.ones_like(ids), max_new_tokens=32, do_sample=False)
print(tokenizer.decode(out[0], skip_special_tokens=True))
```
The model runs Python code from this repository: read it first, or pin `revision=`.
## The LoopTitan Phase 1 models
8 designs, each trained with AdamW and with Muon on the same data, schedule and seed. Test BPB; the model of this page in bold.
| Design | AdamW | Muon |
|:---|---:|---:|
| Standard MoE, 12 layers | [0.9995](https://huggingface.co/NaturalScale/LoopTitan-MoE12-1.3B-A0.2B-AdamW) | [0.9744](https://huggingface.co/NaturalScale/LoopTitan-MoE12-1.3B-A0.2B-Muon) |
| Standard MoE with finer experts | [0.9953](https://huggingface.co/NaturalScale/LoopTitan-MoE12-FineExperts-1.3B-A0.2B-AdamW) | [0.9735](https://huggingface.co/NaturalScale/LoopTitan-MoE12-FineExperts-1.3B-A0.2B-Muon) |
| Standard MoE, deeper and narrower, 18 layers | [0.9926](https://huggingface.co/NaturalScale/LoopTitan-MoE18-1.3B-A0.2B-AdamW) | **0.9702** |
| Standard MoE, 18 layers, fewer experts in the middle | [0.9936](https://huggingface.co/NaturalScale/LoopTitan-MoE18-Layout-1.3B-A0.2B-AdamW) | [0.9710](https://huggingface.co/NaturalScale/LoopTitan-MoE18-Layout-1.3B-A0.2B-Muon) |
| The looped MoE unrolled: 18 layers, no weights shared | [0.9906](https://huggingface.co/NaturalScale/LoopTitan-Unrolled-1.3B-A0.2B-AdamW) | [0.9710](https://huggingface.co/NaturalScale/LoopTitan-Unrolled-1.3B-A0.2B-Muon) |
| Looped MoE: the middle 6 layers run twice | [0.9905](https://huggingface.co/NaturalScale/LoopTitan-Looped-1.3B-A0.2B-AdamW) | [0.9707](https://huggingface.co/NaturalScale/LoopTitan-Looped-1.3B-A0.2B-Muon) |
| Standard MoE with one more visit, outside matched budgets | [0.9847](https://huggingface.co/NaturalScale/LoopTitan-MoE12-Revisit-1.3B-A0.3B-AdamW) | [0.9621](https://huggingface.co/NaturalScale/LoopTitan-MoE12-Revisit-1.3B-A0.3B-Muon) |
| Standard MoE with twice the experts, outside matched budgets | [0.9852](https://huggingface.co/NaturalScale/LoopTitan-MoE12-2xExperts-2.6B-A0.2B-AdamW) | [0.9645](https://huggingface.co/NaturalScale/LoopTitan-MoE12-2xExperts-2.6B-A0.2B-Muon) |
## Citation
If you use this model or its results, please cite LoopTitan; this applies to people and to agents that build on it:
```bibtex
@misc{looptitan2026,
title = {{LoopTitan: What Does Parameter Revisit Buy a Mixture-of-Experts?}},
author = {Tian, Zichen and Lu, Yudong and Wu, Xuansheng and Zou, Na and Hu, Xia and Wang, Guanchu and Sun, Qianru},
year = {2026},
eprint = {2611.34821},
archivePrefix = {arXiv},
primaryClass = {cs.LG},
url = {https://arxiv.org/abs/2611.34821}
}
```
## Licence
[MIT](https://github.com/datamllab/LoopTitan/blob/main/LICENSE). The LoopTitan authors.
|