Instructions to use XiaomiMiMo/MiMo-V2-Flash-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use XiaomiMiMo/MiMo-V2-Flash-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="XiaomiMiMo/MiMo-V2-Flash-Base", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("XiaomiMiMo/MiMo-V2-Flash-Base", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("XiaomiMiMo/MiMo-V2-Flash-Base", trust_remote_code=True) 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use XiaomiMiMo/MiMo-V2-Flash-Base 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-Base" # 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-Base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/XiaomiMiMo/MiMo-V2-Flash-Base
- SGLang
How to use XiaomiMiMo/MiMo-V2-Flash-Base 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-Base" \ --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-Base", "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-Base" \ --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-Base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use XiaomiMiMo/MiMo-V2-Flash-Base with Docker Model Runner:
docker model run hf.co/XiaomiMiMo/MiMo-V2-Flash-Base
Add pipeline_tag and link to technical report
#1
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,8 +1,9 @@
|
|
| 1 |
---
|
| 2 |
-
license: mit
|
| 3 |
base_model:
|
| 4 |
- XiaomiMiMo/MiMo-V2-Flash-Base
|
| 5 |
library_name: transformers
|
|
|
|
|
|
|
| 6 |
---
|
| 7 |
|
| 8 |
<br/><br/>
|
|
@@ -20,10 +21,12 @@ library_name: transformers
|
|
| 20 |
|
|
| 21 |
<a href="https://huggingface.co/XiaomiMiMo/MiMo-V2-Flash" target="_blank">π€ HuggingFace</a>
|
| 22 |
|
|
| 23 |
-
<a href="https://
|
| 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>
|
|
@@ -36,6 +39,8 @@ library_name: transformers
|
|
| 36 |
|
| 37 |
**MiMo-V2-Flash** is a Mixture-of-Experts (MoE) language model with **309B total parameters** and **15B active parameters**. Designed for high-speed reasoning and agentic workflows, it utilizes a novel hybrid attention architecture and Multi-Token Prediction (MTP) to achieve state-of-the-art performance while significantly reducing inference costs.
|
| 38 |
|
|
|
|
|
|
|
| 39 |
<p align="center">
|
| 40 |
<img width="80%" src="https://github.com/XiaomiMiMo/MiMo-V2-Flash/raw/main/figures/MiMo-v2-flash-performance.jpg?raw=true">
|
| 41 |
</p>
|
|
@@ -304,7 +309,7 @@ If you find our work helpful, please cite our technical report:
|
|
| 304 |
title={MiMo-V2-Flash Technical Report},
|
| 305 |
author={LLM-Core Xiaomi},
|
| 306 |
year={2025},
|
| 307 |
-
url={https://
|
| 308 |
}
|
| 309 |
```
|
| 310 |
|
|
@@ -317,4 +322,4 @@ Please contact us at [mimo@xiaomi.com](mailto:mimo@xiaomi.com), join our WeChat
|
|
| 317 |
<img src="https://github.com/XiaomiMiMo/MiMo-V2-Flash/raw/main/figures/wechat_group/wechat2.jpg?raw=true" width="20%" />
|
| 318 |
<img src="https://github.com/XiaomiMiMo/MiMo-V2-Flash/raw/main/figures/wechat_group/wechat3.jpg?raw=true" width="20%" />
|
| 319 |
<img src="https://github.com/XiaomiMiMo/MiMo-V2-Flash/raw/main/figures/wechat_group/wechat4.jpg?raw=true" width="20%" />
|
| 320 |
-
</p>
|
|
|
|
| 1 |
---
|
|
|
|
| 2 |
base_model:
|
| 3 |
- XiaomiMiMo/MiMo-V2-Flash-Base
|
| 4 |
library_name: transformers
|
| 5 |
+
license: mit
|
| 6 |
+
pipeline_tag: text-generation
|
| 7 |
---
|
| 8 |
|
| 9 |
<br/><br/>
|
|
|
|
| 21 |
|
|
| 22 |
<a href="https://huggingface.co/XiaomiMiMo/MiMo-V2-Flash" target="_blank">π€ HuggingFace</a>
|
| 23 |
|
|
| 24 |
+
<a href="https://huggingface.co/papers/2601.02780" target="_blank">π Technical Report </a>
|
| 25 |
|
|
| 26 |
<a href="https://mimo.xiaomi.com/blog/mimo-v2-flash" target="_blank">π° Blog </a>
|
| 27 |
|
|
| 28 |
+
<a href="https://github.com/XiaomiMiMo/MiMo-V2-Flash" target="_blank">π» GitHub </a>
|
| 29 |
+
|
|
| 30 |
<br/><br/>
|
| 31 |
<strong>Play around!</strong>
|
| 32 |
<a href="https://aistudio.xiaomimimo.com" target="_blank">π¨οΈ Xiaomi MiMo Studio </a>
|
|
|
|
| 39 |
|
| 40 |
**MiMo-V2-Flash** is a Mixture-of-Experts (MoE) language model with **309B total parameters** and **15B active parameters**. Designed for high-speed reasoning and agentic workflows, it utilizes a novel hybrid attention architecture and Multi-Token Prediction (MTP) to achieve state-of-the-art performance while significantly reducing inference costs.
|
| 41 |
|
| 42 |
+
The model was presented in the [MiMo-V2-Flash Technical Report](https://huggingface.co/papers/2601.02780).
|
| 43 |
+
|
| 44 |
<p align="center">
|
| 45 |
<img width="80%" src="https://github.com/XiaomiMiMo/MiMo-V2-Flash/raw/main/figures/MiMo-v2-flash-performance.jpg?raw=true">
|
| 46 |
</p>
|
|
|
|
| 309 |
title={MiMo-V2-Flash Technical Report},
|
| 310 |
author={LLM-Core Xiaomi},
|
| 311 |
year={2025},
|
| 312 |
+
url={https://huggingface.co/papers/2601.02780}
|
| 313 |
}
|
| 314 |
```
|
| 315 |
|
|
|
|
| 322 |
<img src="https://github.com/XiaomiMiMo/MiMo-V2-Flash/raw/main/figures/wechat_group/wechat2.jpg?raw=true" width="20%" />
|
| 323 |
<img src="https://github.com/XiaomiMiMo/MiMo-V2-Flash/raw/main/figures/wechat_group/wechat3.jpg?raw=true" width="20%" />
|
| 324 |
<img src="https://github.com/XiaomiMiMo/MiMo-V2-Flash/raw/main/figures/wechat_group/wechat4.jpg?raw=true" width="20%" />
|
| 325 |
+
</p>
|