Instructions to use internlm/Intern-S2-Mobius with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use internlm/Intern-S2-Mobius with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="internlm/Intern-S2-Mobius", trust_remote_code=True) messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoModelForImageTextToText model = AutoModelForImageTextToText.from_pretrained("internlm/Intern-S2-Mobius", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use internlm/Intern-S2-Mobius with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "internlm/Intern-S2-Mobius" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "internlm/Intern-S2-Mobius", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/internlm/Intern-S2-Mobius
- SGLang
How to use internlm/Intern-S2-Mobius 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 "internlm/Intern-S2-Mobius" \ --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": "internlm/Intern-S2-Mobius", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "internlm/Intern-S2-Mobius" \ --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": "internlm/Intern-S2-Mobius", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use internlm/Intern-S2-Mobius with Docker Model Runner:
docker model run hf.co/internlm/Intern-S2-Mobius
File size: 7,860 Bytes
06cd0e0 2fd8ae7 06cd0e0 2fd8ae7 06cd0e0 2fd8ae7 fa3de07 2fd8ae7 fe6e6ff 2fd8ae7 fa3de07 2fd8ae7 fa3de07 2fd8ae7 fa3de07 2fd8ae7 fa3de07 4efe000 fa3de07 2fd8ae7 fa3de07 2fd8ae7 d7f1d4c 87c9148 d7f1d4c 2fd8ae7 c0b0941 2fd8ae7 d7f1d4c 2fd8ae7 d7f1d4c 2fd8ae7 | 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 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | ---
library_name: transformers
license: apache-2.0
license_link: https://huggingface.co/internlm/Intern-S2-Mobius/blob/main/LICENSE
pipeline_tag: image-text-to-text
---
## Intern-S2-Mobius
<div align="center">
<img src="./figs/title.png" />
<div> </div>
[💻Github Repo](https://github.com/InternLM/Intern-S2-Mobius) • [🤗Model Collections](https://huggingface.co/collections/internlm/intern-s2) • [🌳Arch Space](https://github.com/InternLM/archspace)
</div>
## Introduction
We introduce **Intern-S2-Mobius**, a 35B foundation model built on the Mobius-v0 architecture realized by Xtuner and LMDeploy. Instead of binding knowledge storage and reasoning computation layer by layer as in conventional Transformer models, Mobius organizes knowledge into a globally shared **Memory** and lets multiple **Reasoners** iteratively query and refine hidden states against this shared repository.
This knowledge-reasoning separation gives Intern-S2-Mobius two native capabilities: **Backward Residual Connection**, where reasoning stages can access knowledge beyond their local layer hierarchy, and **Dynamic Latent Reasoning**, where deliberation, refinement, and multi-token prediction are internalized into high-density continuous states. Continual-pretrained from Qwen3.5-35B and further post-trained with SFT and RL, Intern-S2-Mobius preserves strong downstream capability while achieving substantially higher end-to-end inference efficiency, with nearly 4x speedup reported in the technical report.
### Features
- **Knowledge-reasoning decoupled architecture.** Intern-S2-Mobius separates knowledge vectors from reasoning operators by replacing layer-bound FFN knowledge storage with a globally shared Memory. This gives each Reasoner access to a broader knowledge space and improves knowledge compression compared with a standard Transformer layout.
- **Backward Residual Connection.** Through shared Memory, shallow and deep reasoning stages can access knowledge across the model rather than relying only on forward layer-wise information flow. This enables more flexible cross-layer knowledge composition and helps the model synthesize useful information in fewer reasoning steps.
- **Dynamic Latent Reasoning.** Mobius refines continuous hidden states through recurrent latent iteration before decoding. This internalizes part of the deliberation process, reduces reliance on long visible chain-of-thought, and dynamically allocates computation to different tokens.
- **Higher inference efficiency with concise reasoning.** On reasoning benchmarks, Intern-S2-Mobius reaches comparable or stronger scores than the Qwen3.5-35B baseline while producing markedly shorter reasoning traces and higher request throughput, leading to nearly 4x end-to-end inference speedup in the reported evaluation.
- **Strong general and scientific performance.** Intern-S2-Mobius improves the reported average score over Qwen3.5-35B on general reasoning benchmarks, and shows large gains on scientific tasks such as Biology-Instructions, Mol-Instructions, and MolecularIQ.
<figure>
<img src="./figs/efficiency.png" alt="Mobius inference efficiency">
<figcaption>Fig1: Inference efficiency on reasoning benchmarks. Intern-S2-Mobius improves request throughput over the Transformer baseline while maintaining strong reasoning performance, with gains largely coming from shorter, more compact reasoning traces.</figcaption>
</figure>
<figure>
<img src="./figs/chain-of-thought.png" alt="chain of thought">
<figcaption>Fig2: The average output length of Mobius continual pre-trained from Qwen3.5.</figcaption>
</figure>
### Performance
We evaluate the Intern-S2-Mobius on various benchmarks, including general datasets and scientific datasets. We report the performance comparison with Qwen3.5-35B below. We use the [OpenCompass](https://github.com/open-compass/OpenCompass/) to evaluate all models. For text benchmarks, Intern-S2-Mobius is evaluated with a maximum inference length of 64K tokens on MMLU Pro, SimpleQA, and HLE, and 128K tokens on the remaining text benchmarks.
<figure>
<img src="./figs/performance.png" alt="performance">
<figcaption>Fig3: Performance comparison across general and scientific benchmarks. The higher score in each row is highlighted in <strong>bold</strong>.</figcaption>
</figure>
<figure>
<img src="./figs/case-study.png" alt="case study">
<figcaption>Fig4: Step-aligned comparison between Intern-S2-Mobius-35B and Qwen3.5-35B
on a linear-algebra multiple-choice question. Both models select the correct
answer (Option C). Token counts are computed using the Qwen3.5-35B tokenizer. Mobius completes the same reasoning steps with fewer tokens, which mainly benefits from the model's elimination of repeated derivation and checks.</figcaption>
</figure>
## Quick Start
The Intern-S2-Mobius release is a 35B model stored in bfloat16 weight format. This guide provides deployment examples for the following configurations:
- MTP speculative decoding (Recommended)
- Basic serving without MTP
> NOTE: The commands below are reference configurations. Inference frameworks are under active development, so use the latest framework documentation and your local validation results when tuning production deployments.
Intern-S2-Mobius can be deployed using any of the following LLM inference frameworks:
- LMDeploy
- Transformers
- vLLM
### Sampling Parameters
We recommend using the following hyperparameters to ensure better results
```python
top_p = 1
top_k = 50
min_p = 0.0
temperature = 0.8
```
### LMDeploy
Use the latest LMDeploy with Intern-S2-Mobius support. The examples below use single-GPU serving.
- Serving With MTP (Recommended)
```bash
lmdeploy serve api_server \
internlm/Intern-S2-Mobius \
--trust-remote-code \
--backend pytorch \
--tp 1 \
--speculative-algorithm qwen3_5_mtp \
--speculative-num-draft-tokens 4 \
--dtype bfloat16 \
--max-batch-size 64
```
- Basic Serving Without MTP
```bash
lmdeploy serve api_server \
internlm/Intern-S2-Mobius \
--trust-remote-code \
--backend pytorch \
--dtype bfloat16 \
--tp 1
```
### Transformers
Use a recent Transformers version with remote-code loading enabled.
- Basic Inference
```python
import torch
from transformers import AutoModelForImageTextToText, AutoTokenizer
model_path = "internlm/Intern-S2-Mobius"
tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
model = AutoModelForImageTextToText.from_pretrained(
model_path,
trust_remote_code=True,
torch_dtype=torch.bfloat16,
device_map="auto",
).eval()
messages = [
{"role": "user", "content": "Give me a short introduction to Intern-S2-Mobius."}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
with torch.no_grad():
output_ids = model.generate(
**inputs,
max_new_tokens=512,
do_sample=True,
temperature=0.8,
top_p=1,
)
response_ids = output_ids[0][inputs["input_ids"].shape[-1]:]
print(tokenizer.decode(response_ids, skip_special_tokens=True))
```
### vLLM
Use the latest vLLM Docker image or source build with Intern-S2-Mobius support.
- Serving With MTP (Recommended)
```bash
vllm serve \
internlm/Intern-S2-Mobius \
--trust-remote-code \
--tensor-parallel-size 2 \
--reasoning-parser qwen3 \
--enable-auto-tool-choice \
--tool-call-parser qwen3_coder \
--spec-method mtp \
--spec-tokens 4
```
- Basic Serving Without MTP
```bash
vllm serve \
internlm/Intern-S2-Mobius \
--trust-remote-code \
--tensor-parallel-size 2 \
--reasoning-parser qwen3 \
--enable-auto-tool-choice \
--tool-call-parser qwen3_coder
```
|