Instructions to use XiaomiMiMo/MiMo-V2-Flash with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use XiaomiMiMo/MiMo-V2-Flash with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="XiaomiMiMo/MiMo-V2-Flash", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("XiaomiMiMo/MiMo-V2-Flash", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("XiaomiMiMo/MiMo-V2-Flash", trust_remote_code=True, device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use XiaomiMiMo/MiMo-V2-Flash with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "XiaomiMiMo/MiMo-V2-Flash" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "XiaomiMiMo/MiMo-V2-Flash", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/XiaomiMiMo/MiMo-V2-Flash
- SGLang
How to use XiaomiMiMo/MiMo-V2-Flash 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 "XiaomiMiMo/MiMo-V2-Flash" \ --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": "XiaomiMiMo/MiMo-V2-Flash", "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 "XiaomiMiMo/MiMo-V2-Flash" \ --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": "XiaomiMiMo/MiMo-V2-Flash", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use XiaomiMiMo/MiMo-V2-Flash with Docker Model Runner:
docker model run hf.co/XiaomiMiMo/MiMo-V2-Flash
Update README.md
Browse files
README.md
CHANGED
|
@@ -5,6 +5,8 @@ base_model:
|
|
| 5 |
library_name: transformers
|
| 6 |
---
|
| 7 |
|
|
|
|
|
|
|
| 8 |
<div align="center">
|
| 9 |
<picture>
|
| 10 |
<source srcset="https://github.com/XiaomiMiMo/MiMo-V2-Flash/raw/main/figures/Xiaomi_MiMo_darkmode.png?raw=true" media="(prefers-color-scheme: dark)">
|
|
@@ -16,13 +18,17 @@ library_name: transformers
|
|
| 16 |
|
| 17 |
<div align="center" style="line-height: 1;">
|
| 18 |
|
|
| 19 |
-
<a href="https://huggingface.co/
|
| 20 |
|
|
| 21 |
-
<a href="https://github.com/
|
| 22 |
|
|
| 23 |
<a href="https://mimo.xiaomi.com/blog/mimo-v2-flash" target="_blank">π° Blog </a>
|
| 24 |
|
|
| 25 |
-
<br/>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
</div>
|
| 27 |
<br/>
|
| 28 |
|
|
@@ -51,8 +57,8 @@ MiMo-V2-Flash creates a new balance between long-context modeling capability and
|
|
| 51 |
|
| 52 |
| Model | Total Params | Active Params | Context Length | Download |
|
| 53 |
| :--------------------- | :----------: | :-----------: | :------------: | :-------------------------------------------------------------------: |
|
| 54 |
-
| **MiMo-V2-Flash-Base** | 309B | 15B | 256k | [π€ HuggingFace](https://huggingface.co/
|
| 55 |
-
| **MiMo-V2-Flash** | 309B | 15B | 256k | [π€ HuggingFace](https://huggingface.co/
|
| 56 |
|
| 57 |
> [!IMPORTANT]
|
| 58 |
> We also open-source the 3-layer MTP weights to foster community research.
|
|
@@ -248,6 +254,9 @@ curl -i http://localhost:9001/v1/chat/completions \
|
|
| 248 |
}'
|
| 249 |
```
|
| 250 |
|
|
|
|
|
|
|
|
|
|
| 251 |
-----
|
| 252 |
|
| 253 |
## 7. Citation
|
|
@@ -259,10 +268,17 @@ If you find our work helpful, please cite our technical report:
|
|
| 259 |
title={MiMo-V2-Flash Technical Report},
|
| 260 |
author={LLM-Core Xiaomi},
|
| 261 |
year={2025},
|
| 262 |
-
url={https://github.com/
|
| 263 |
}
|
| 264 |
```
|
| 265 |
|
| 266 |
## 8. Contact
|
| 267 |
|
| 268 |
-
Please contact us at [mimo@xiaomi.com](mailto:mimo@xiaomi.com) or open an issue if you have any questions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
library_name: transformers
|
| 6 |
---
|
| 7 |
|
| 8 |
+
<br/><br/>
|
| 9 |
+
|
| 10 |
<div align="center">
|
| 11 |
<picture>
|
| 12 |
<source srcset="https://github.com/XiaomiMiMo/MiMo-V2-Flash/raw/main/figures/Xiaomi_MiMo_darkmode.png?raw=true" media="(prefers-color-scheme: dark)">
|
|
|
|
| 18 |
|
| 19 |
<div align="center" style="line-height: 1;">
|
| 20 |
|
|
| 21 |
+
<a href="https://huggingface.co/XiaomiMiMo/MiMo-V2-Flash" target="_blank">π€ HuggingFace</a>
|
| 22 |
|
|
| 23 |
+
<a href="https://github.com/XiaomiMiMo/MiMo-V2-Flash/blob/main/paper.pdf" target="_blank">π Technical Report </a>
|
| 24 |
|
|
| 25 |
<a href="https://mimo.xiaomi.com/blog/mimo-v2-flash" target="_blank">π° Blog </a>
|
| 26 |
|
|
| 27 |
+
<br/><br/>
|
| 28 |
+
<strong>Play around!</strong>
|
| 29 |
+
<a href="https://aistudio.xiaomimimo.com" target="_blank">π¨οΈ Xiaomi MiMo Studio </a>
|
| 30 |
+
|
| 31 |
+
<a href="https://platform.xiaomimimo.com/" target="_blank">π¨ Xiaomi MiMo API Platform </a>
|
| 32 |
</div>
|
| 33 |
<br/>
|
| 34 |
|
|
|
|
| 57 |
|
| 58 |
| Model | Total Params | Active Params | Context Length | Download |
|
| 59 |
| :--------------------- | :----------: | :-----------: | :------------: | :-------------------------------------------------------------------: |
|
| 60 |
+
| **MiMo-V2-Flash-Base** | 309B | 15B | 256k | [π€ HuggingFace](https://huggingface.co/XiaomiMiMo/MiMo-V2-Flash-Base) |
|
| 61 |
+
| **MiMo-V2-Flash** | 309B | 15B | 256k | [π€ HuggingFace](https://huggingface.co/XiaomiMiMo/MiMo-V2-Flash) |
|
| 62 |
|
| 63 |
> [!IMPORTANT]
|
| 64 |
> We also open-source the 3-layer MTP weights to foster community research.
|
|
|
|
| 254 |
}'
|
| 255 |
```
|
| 256 |
|
| 257 |
+
> [!IMPORTANT]
|
| 258 |
+
> In the thinking mode with multi-turn tool calls, the model returns a `reasoning_content` field alongside `tool_calls`. To continue the conversation, the user must persist all history `reasoning_content` in the `messages` array of each subsequent request.
|
| 259 |
+
|
| 260 |
-----
|
| 261 |
|
| 262 |
## 7. Citation
|
|
|
|
| 268 |
title={MiMo-V2-Flash Technical Report},
|
| 269 |
author={LLM-Core Xiaomi},
|
| 270 |
year={2025},
|
| 271 |
+
url={https://github.com/XiaomiMiMo/MiMo-V2-Flash/paper.pdf}
|
| 272 |
}
|
| 273 |
```
|
| 274 |
|
| 275 |
## 8. Contact
|
| 276 |
|
| 277 |
+
Please contact us at [mimo@xiaomi.com](mailto:mimo@xiaomi.com), join our WeChat group below or open an issue if you have any questions.
|
| 278 |
+
|
| 279 |
+
<p align="center">
|
| 280 |
+
<img src="https://github.com/XiaomiMiMo/MiMo-V2-Flash/raw/main/figures/wechat_group/wechat1.jpg?raw=true" width="20%" />
|
| 281 |
+
<img src="https://github.com/XiaomiMiMo/MiMo-V2-Flash/raw/main/figures/wechat_group/wechat2.jpg?raw=true" width="20%" />
|
| 282 |
+
<img src="https://github.com/XiaomiMiMo/MiMo-V2-Flash/raw/main/figures/wechat_group/wechat3.jpg?raw=true" width="20%" />
|
| 283 |
+
<img src="https://github.com/XiaomiMiMo/MiMo-V2-Flash/raw/main/figures/wechat_group/wechat4.jpg?raw=true" width="20%" />
|
| 284 |
+
</p>
|