bwshen-mi commited on
Commit
c81548f
Β·
verified Β·
1 Parent(s): ce93257

Update formulas in README.md

Browse files
Files changed (1) hide show
  1. README.md +213 -213
README.md CHANGED
@@ -1,213 +1,213 @@
1
- ---
2
- license: mit
3
- ---
4
-
5
- <div align="center">
6
- <picture>
7
- <source srcset="https://github.com/XiaomiMiMo/MiMo/raw/main/figures/Xiaomi_MiMo_darkmode.png?raw=true" media="(prefers-color-scheme: dark)">
8
- <img src="https://github.com/XiaomiMiMo/MiMo/raw/main/figures/Xiaomi_MiMo.png?raw=true" width="60%" alt="Xiaomi-MiMo" />
9
- </picture>
10
- </div>
11
-
12
- <h3 align="center">
13
- <b>
14
- <span>━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</span>
15
- <br/>
16
- Unlocking the Reasoning Potential of Language Model<br/>From Pretraining to Posttraining
17
- <br/>
18
- <span>━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</span>
19
- <br/>
20
- </b>
21
- </h3>
22
-
23
- <br/>
24
-
25
- <div align="center" style="line-height: 1;">
26
- |
27
- <a href="https://huggingface.co/XiaomiMiMo" target="_blank">πŸ€— HuggingFace</a>
28
- &nbsp;|
29
- <a href="https://github.com/XiaomiMiMo/MiMo/blob/main/MiMo-7B-Technical-Report.pdf" target="_blank">πŸ“” Technical Report</a>
30
- &nbsp;|
31
- <br/>
32
- </div>
33
-
34
- <br/>
35
-
36
- > This model repository is licensed under the MIT License.
37
-
38
- ## I. Introduction
39
-
40
- Currently, most successful RL works, including open-source research, rely on relatively large base models, e.g., 32B models, particularly for enhancing code reasoning capabilities. Moreover, it was widely considered that achieving uniform and simultaneous improvements in both mathematical and code capabilities within a small model is challenging. Nonetheless, we believe that the effectiveness of the RL trained reasoning model relies on the inherent reasoning potential of the base model. To fully unlock the reasoning potential of language models, efforts must focus not only on post-training but also on pre-training strategies tailored to reasoning.
41
-
42
- In this work, we present MiMo-7B, a series of models trained from scratch and born for reasoning tasks. Our RL experiments from MiMo-7B-Base show that our model possesses extraordinary reasoning potential, even surpassing much larger 32B models. Additionally, we perform RL training on a cold-started SFT model, resulting in MiMo-7B-RL, which demonstrates superior performance on both mathematics and code reasoning tasks, matching the performance of OpenAI o1-mini.
43
-
44
- <p align="center">
45
- <img width="80%" src="https://github.com/XiaomiMiMo/MiMo/raw/main/figures/curve.png?raw=true">
46
- </p>
47
-
48
- We open-source MiMo-7B series, including checkpoints of the base model, SFT model, RL model trained from base model, and RL model trained from the SFT model.
49
- We believe this report along with the models will provides valuable insights to develop powerful reasoning LLM that benefit the larger community.
50
-
51
- ### 🌟 Highlights
52
-
53
- - **Pre-Training: Base Model Born for Reasoning**
54
- - We optimize data preprocessing pipeline, enhancing text extraction toolkits and applying multi-dimensional data filtering to increase reasoning pattern density in pre-training data. We also employ multiple strategies to generate massive diverse synthetic reasoning data.
55
- - We adopt a three-stage data mixture strategy for pre-training. Overall, MiMo-7B-Base is pre-trained on approximately 25 trillion tokens.
56
- - We incorporate Multiple-Token Prediction as an additional training objective, which enhances model performance and accelerates inference.
57
-
58
- - **Post-Training Recipe: Pioneering Reasoning Model**
59
- - We curate 130K mathematics and code problems as RL training data, which can be verified by rule-based verifiers. Each problem undergoes careful cleaning and difficulty assessment to ensure quality. We employ only rule-based accuracy rewards to avoid potential reward hacking.
60
- - To mitigate the sparse reward issue for challenging code problems, we introduce a test difficulty driven code reward. By assigning fine-grained scores for test cases with varying difficulty levels, the policy can be more effectively optimized via dense reward signal.
61
- - We implement a data re-sampling strategy for easy problems to enhance rollout sampling efficiency and stabilize policy updates, particularly in the later phases of RL training.
62
-
63
- - **RL Infrastructures**
64
- - We develop a Seamless Rollout Engine to accelerate RL training and validation. Our design integrates continuous rollout, asynchronous reward computation, and early termination to minimize GPU idle time, achieving 2.29$\times$ faster training and 1.96$\times$ faster validation.
65
- - We support MTP in vLLM and enhance the robustness of the inference engine in RL system.
66
-
67
-
68
- ## II. Model Details
69
-
70
- > Models are avaliable at [https://huggingface.co/XiaomiMiMo](https://huggingface.co/XiaomiMiMo)
71
-
72
- | **Model** | **Description** | **Download** |
73
- | :-------------: | :---------------------------------------------------------------------------: | :-------------------------------------------------------------------------------: |
74
- | MiMo-7B-Base | Base model with extraordinary reasoning potential | [πŸ€— XiaomiMiMo/MiMo-7B-Base](https://huggingface.co/XiaomiMiMo/MiMo-7B-Base) |
75
- | MiMo-7B-RL-Zero | RL model trained from base model | [πŸ€— XiaomiMiMo/MiMo-7B-RL-Zero](https://huggingface.co/XiaomiMiMo/MiMo-7B-RL-Zero) |
76
- | **MiMo-7B-SFT** | SFT model trained from base model | [πŸ€— XiaomiMiMo/MiMo-7B-SFT](https://huggingface.co/XiaomiMiMo/MiMo-7B-SFT) |
77
- | MiMo-7B-RL | RL model trained from SFT model, superior performance matching OpenAI o1-mini | [πŸ€— XiaomiMiMo/MiMo-7B-RL](https://huggingface.co/XiaomiMiMo/MiMo-7B-RL) |
78
-
79
- ## III. Evaluation Results
80
-
81
- | Benchmark | GPT-4o-0513 | Claude-3.5-Sonnet-1022 | OpenAI o1-mini | QwQ-32B-Preview | R1-Distill-Qwen-14B | R1-Distill-Qwen-7B | **MiMo-7B-RL** |
82
- | ----------------------------- | :---------: | :--------------------: | :------------: | :-------------: | :-----------------: | :----------------: | :------------: |
83
- | **General** | | | | | | | |
84
- | GPQA Diamond<br/>(Pass@1) | 49.9 | 65.0 | 60.0 | 54.5 | 59.1 | 49.1 | 54.4 |
85
- | SuperGPQA<br/>(Pass@1) | 42.4 | 48.2 | 45.2 | 43.6 | 40.6 | 28.9 | 40.5 |
86
- | DROP<br/>(3-shot F1) | 83.7 | 88.3 | 83.9 | 71.2 | 85.5 | 77.0 | 78.7 |
87
- | MMLU-Pro<br/>(EM) | 72.6 | 78.0 | 80.3 | 52.0 | 68.8 | 53.5 | 58.6 |
88
- | IF-Eval<br/>(Prompt Strict) | 84.3 | 86.5 | 84.8 | 40.4 | 78.3 | 60.5 | 61.0 |
89
- | **Mathematics** | | | | | | | |
90
- | MATH-500<br/>(Pass@1) | 74.6 | 78.3 | 90.0 | 90.6 | 93.9 | 92.8 | 95.8 |
91
- | AIME 2024<br/>(Pass@1) | 9.3 | 16.0 | 63.6 | 50.0 | 69.7 | 55.5 | 68.2 |
92
- | AIME 2025<br/>(Pass@1) | 11.6 | 7.4 | 50.7 | 32.4 | 48.2 | 38.8 | 55.4 |
93
- | **Code** | | | | | | | |
94
- | LiveCodeBench v5<br/>(Pass@1) | 32.9 | 38.9 | 53.8 | 41.9 | 53.1 | 37.6 | 57.8 |
95
- | LiveCodeBench v6<br/>(Pass@1) | 30.9 | 37.2 | 46.8 | 39.1 | 31.9 | 23.9 | 49.3 |
96
-
97
- MiMo-7B series
98
-
99
- | Benchmark | MiMo-7B-Base | MiMo-7B-RL-Zero | **MiMo-7B-SFT** | MiMo-7B-RL |
100
- | ----------------------------- | :----------: | :-------------: | :-------------: | :--------: |
101
- | **Mathematics** | | | | |
102
- | MATH500<br/>(Pass@1) | 37.4 | 93.6 | 93.0 | 95.8 |
103
- | AIME 2024<br/>(Pass@1) | 32.9 | 56.4 | 58.7 | 68.2 |
104
- | AIME 2025<br/>(Pass@1) | 24.3 | 46.3 | 44.3 | 55.4 |
105
- | **Code** | | | | |
106
- | LiveCodeBench v5<br/>(Pass@1) | 32.9 | 49.1 | 52.3 | 57.8 |
107
- | LiveCodeBench v6<br/>(Pass@1) | 29.1 | 42.9 | 45.5 | 49.3 |
108
-
109
- > [!IMPORTANT]
110
- > The evaluation are conducted with `temperature=0.6`.
111
- >
112
- > AIME24 and AIME25 are with averaged score of 32 repetitions. LiveCodeBench v5 (20240801-20250201), LiveCodeBench v6 (20250201-20250501), GPQA-Diamond and IF-Eval are with averaged score of 8 repetitions. MATH500 and SuperGPQA are with a single run.
113
-
114
- ## IV. Deployment
115
-
116
- ### vLLM inference
117
-
118
- 1. [Recommended] We official support inference with MiMo-MTP using [our fork of vLLM](https://github.com/XiaomiMiMo/vllm/tree/feat_mimo_mtp).
119
-
120
- Example script
121
-
122
- ```py
123
- from vllm import LLM, SamplingParams
124
-
125
- model_path = "/path/to/MiMo"
126
- llm = LLM(
127
- model=model_path,
128
- trust_remote_code=True,
129
- num_speculative_tokens=1,
130
- disable_log_stats=False
131
- )
132
- sampling_params = SamplingParams(temperature=0.6)
133
-
134
- conversation = [
135
- {
136
- "role": "system",
137
- "content": ""
138
- },
139
- {
140
- "role": "user",
141
- "content": "Write an essay about the importance of higher education.",
142
- },
143
- ]
144
-
145
- outputs = llm.chat(conversation,
146
- sampling_params=sampling_params,
147
- use_tqdm=False)
148
-
149
- for output in outputs:
150
- prompt = output.prompt
151
- generated_text = output.outputs[0].text
152
- print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}")
153
-
154
- print("=" * 80)
155
- ```
156
-
157
- 2. Or, you can register a vLLM loader for MiMo without loading MTP parameters.
158
-
159
- You can copy the [`registry/register_mimo_in_vllm.py`](https://github.com/XiaomiMiMo/MiMo/blob/main/registry/register_mimo_in_vllm.py) to your directory and import it with
160
-
161
- ```py
162
- import register_mimo_in_vllm
163
-
164
- from vllm import LLM, SamplingParams
165
-
166
- model_path = "/path/to/MiMo"
167
- llm = LLM(
168
- model=model_path,
169
- trust_remote_code=True,
170
- # num_speculative_tokens=1,
171
- disable_log_stats=False
172
- )
173
- sampling_params = SamplingParams(temperature=0.6)
174
- ```
175
-
176
- ### HuggingFace inference
177
-
178
- Example script
179
-
180
- ```py
181
- from transformers import AutoModel, AutoModelForCausalLM, AutoTokenizer
182
-
183
- model_path = "/path/to/MiMo"
184
- model = AutoModelForCausalLM.from_pretrained(model_path, trust_remote_code=True)
185
- tokenizer = AutoTokenizer.from_pretrained(model_path)
186
- inputs = tokenizer(["Today is"], return_tensors='pt')
187
- output = model.generate(**inputs, max_new_tokens = 100)
188
- print(tokenizer.decode(output.tolist()[0]))
189
- ```
190
-
191
- ### Recommended environment and prompts
192
-
193
- - We recommend using [our fork of vLLM](https://github.com/XiaomiMiMo/vllm/tree/feat_mimo_mtp) which is developed based on vLLM 0.7.3.
194
- - We recommend using empty system prompt.
195
-
196
- > We haven't verified MiMo with other inference engines and welcome contributions based on the model definition in the Huggingface repo πŸ’».
197
-
198
- ## V. Citation
199
-
200
- ```bibtex
201
- @misc{xiaomi2025mimo,
202
- title={MiMo: Unlocking the Reasoning Potential of Language Model – From Pretraining to Posttraining},
203
- author={{Xiaomi LLM-Core Team}},
204
- year={2025},
205
- primaryClass={cs.CL},
206
- url={https://github.com/XiaomiMiMo/MiMo},
207
- }
208
- ```
209
-
210
-
211
- ## VI. Contact
212
-
213
- Please contact us at [[email protected]](mailto:[email protected]) or open an issue if you have any questions.
 
1
+ ---
2
+ license: mit
3
+ ---
4
+
5
+ <div align="center">
6
+ <picture>
7
+ <source srcset="https://github.com/XiaomiMiMo/MiMo/raw/main/figures/Xiaomi_MiMo_darkmode.png?raw=true" media="(prefers-color-scheme: dark)">
8
+ <img src="https://github.com/XiaomiMiMo/MiMo/raw/main/figures/Xiaomi_MiMo.png?raw=true" width="60%" alt="Xiaomi-MiMo" />
9
+ </picture>
10
+ </div>
11
+
12
+ <h3 align="center">
13
+ <b>
14
+ <span>━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</span>
15
+ <br/>
16
+ Unlocking the Reasoning Potential of Language Model<br/>From Pretraining to Posttraining
17
+ <br/>
18
+ <span>━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</span>
19
+ <br/>
20
+ </b>
21
+ </h3>
22
+
23
+ <br/>
24
+
25
+ <div align="center" style="line-height: 1;">
26
+ |
27
+ <a href="https://huggingface.co/XiaomiMiMo" target="_blank">πŸ€— HuggingFace</a>
28
+ &nbsp;|
29
+ <a href="https://github.com/XiaomiMiMo/MiMo/blob/main/MiMo-7B-Technical-Report.pdf" target="_blank">πŸ“” Technical Report</a>
30
+ &nbsp;|
31
+ <br/>
32
+ </div>
33
+
34
+ <br/>
35
+
36
+ > This model repository is licensed under the MIT License.
37
+
38
+ ## I. Introduction
39
+
40
+ Currently, most successful RL works, including open-source research, rely on relatively large base models, e.g., 32B models, particularly for enhancing code reasoning capabilities. Moreover, it was widely considered that achieving uniform and simultaneous improvements in both mathematical and code capabilities within a small model is challenging. Nonetheless, we believe that the effectiveness of the RL trained reasoning model relies on the inherent reasoning potential of the base model. To fully unlock the reasoning potential of language models, efforts must focus not only on post-training but also on pre-training strategies tailored to reasoning.
41
+
42
+ In this work, we present MiMo-7B, a series of models trained from scratch and born for reasoning tasks. Our RL experiments from MiMo-7B-Base show that our model possesses extraordinary reasoning potential, even surpassing much larger 32B models. Additionally, we perform RL training on a cold-started SFT model, resulting in MiMo-7B-RL, which demonstrates superior performance on both mathematics and code reasoning tasks, matching the performance of OpenAI o1-mini.
43
+
44
+ <p align="center">
45
+ <img width="80%" src="https://github.com/XiaomiMiMo/MiMo/raw/main/figures/curve.png?raw=true">
46
+ </p>
47
+
48
+ We open-source MiMo-7B series, including checkpoints of the base model, SFT model, RL model trained from base model, and RL model trained from the SFT model.
49
+ We believe this report along with the models will provides valuable insights to develop powerful reasoning LLM that benefit the larger community.
50
+
51
+ ### 🌟 Highlights
52
+
53
+ - **Pre-Training: Base Model Born for Reasoning**
54
+ - We optimize data preprocessing pipeline, enhancing text extraction toolkits and applying multi-dimensional data filtering to increase reasoning pattern density in pre-training data. We also employ multiple strategies to generate massive diverse synthetic reasoning data.
55
+ - We adopt a three-stage data mixture strategy for pre-training. Overall, MiMo-7B-Base is pre-trained on approximately 25 trillion tokens.
56
+ - We incorporate Multiple-Token Prediction as an additional training objective, which enhances model performance and accelerates inference.
57
+
58
+ - **Post-Training Recipe: Pioneering Reasoning Model**
59
+ - We curate 130K mathematics and code problems as RL training data, which can be verified by rule-based verifiers. Each problem undergoes careful cleaning and difficulty assessment to ensure quality. We employ only rule-based accuracy rewards to avoid potential reward hacking.
60
+ - To mitigate the sparse reward issue for challenging code problems, we introduce a test difficulty driven code reward. By assigning fine-grained scores for test cases with varying difficulty levels, the policy can be more effectively optimized via dense reward signal.
61
+ - We implement a data re-sampling strategy for easy problems to enhance rollout sampling efficiency and stabilize policy updates, particularly in the later phases of RL training.
62
+
63
+ - **RL Infrastructures**
64
+ - We develop a Seamless Rollout Engine to accelerate RL training and validation. Our design integrates continuous rollout, asynchronous reward computation, and early termination to minimize GPU idle time, achieving 2.29 \\(\times\\) faster training and 1.96 \\(\times\\) faster validation.
65
+ - We support MTP in vLLM and enhance the robustness of the inference engine in RL system.
66
+
67
+
68
+ ## II. Model Details
69
+
70
+ > Models are avaliable at [https://huggingface.co/XiaomiMiMo](https://huggingface.co/XiaomiMiMo)
71
+
72
+ | **Model** | **Description** | **Download** |
73
+ | :-------------: | :---------------------------------------------------------------------------: | :-------------------------------------------------------------------------------: |
74
+ | MiMo-7B-Base | Base model with extraordinary reasoning potential | [πŸ€— XiaomiMiMo/MiMo-7B-Base](https://huggingface.co/XiaomiMiMo/MiMo-7B-Base) |
75
+ | MiMo-7B-RL-Zero | RL model trained from base model | [πŸ€— XiaomiMiMo/MiMo-7B-RL-Zero](https://huggingface.co/XiaomiMiMo/MiMo-7B-RL-Zero) |
76
+ | **MiMo-7B-SFT** | SFT model trained from base model | [πŸ€— XiaomiMiMo/MiMo-7B-SFT](https://huggingface.co/XiaomiMiMo/MiMo-7B-SFT) |
77
+ | MiMo-7B-RL | RL model trained from SFT model, superior performance matching OpenAI o1-mini | [πŸ€— XiaomiMiMo/MiMo-7B-RL](https://huggingface.co/XiaomiMiMo/MiMo-7B-RL) |
78
+
79
+ ## III. Evaluation Results
80
+
81
+ | Benchmark | GPT-4o-0513 | Claude-3.5-Sonnet-1022 | OpenAI o1-mini | QwQ-32B-Preview | R1-Distill-Qwen-14B | R1-Distill-Qwen-7B | **MiMo-7B-RL** |
82
+ | ----------------------------- | :---------: | :--------------------: | :------------: | :-------------: | :-----------------: | :----------------: | :------------: |
83
+ | **General** | | | | | | | |
84
+ | GPQA Diamond<br/>(Pass@1) | 49.9 | 65.0 | 60.0 | 54.5 | 59.1 | 49.1 | 54.4 |
85
+ | SuperGPQA<br/>(Pass@1) | 42.4 | 48.2 | 45.2 | 43.6 | 40.6 | 28.9 | 40.5 |
86
+ | DROP<br/>(3-shot F1) | 83.7 | 88.3 | 83.9 | 71.2 | 85.5 | 77.0 | 78.7 |
87
+ | MMLU-Pro<br/>(EM) | 72.6 | 78.0 | 80.3 | 52.0 | 68.8 | 53.5 | 58.6 |
88
+ | IF-Eval<br/>(Prompt Strict) | 84.3 | 86.5 | 84.8 | 40.4 | 78.3 | 60.5 | 61.0 |
89
+ | **Mathematics** | | | | | | | |
90
+ | MATH-500<br/>(Pass@1) | 74.6 | 78.3 | 90.0 | 90.6 | 93.9 | 92.8 | 95.8 |
91
+ | AIME 2024<br/>(Pass@1) | 9.3 | 16.0 | 63.6 | 50.0 | 69.7 | 55.5 | 68.2 |
92
+ | AIME 2025<br/>(Pass@1) | 11.6 | 7.4 | 50.7 | 32.4 | 48.2 | 38.8 | 55.4 |
93
+ | **Code** | | | | | | | |
94
+ | LiveCodeBench v5<br/>(Pass@1) | 32.9 | 38.9 | 53.8 | 41.9 | 53.1 | 37.6 | 57.8 |
95
+ | LiveCodeBench v6<br/>(Pass@1) | 30.9 | 37.2 | 46.8 | 39.1 | 31.9 | 23.9 | 49.3 |
96
+
97
+ MiMo-7B series
98
+
99
+ | Benchmark | MiMo-7B-Base | MiMo-7B-RL-Zero | **MiMo-7B-SFT** | MiMo-7B-RL |
100
+ | ----------------------------- | :----------: | :-------------: | :-------------: | :--------: |
101
+ | **Mathematics** | | | | |
102
+ | MATH500<br/>(Pass@1) | 37.4 | 93.6 | 93.0 | 95.8 |
103
+ | AIME 2024<br/>(Pass@1) | 32.9 | 56.4 | 58.7 | 68.2 |
104
+ | AIME 2025<br/>(Pass@1) | 24.3 | 46.3 | 44.3 | 55.4 |
105
+ | **Code** | | | | |
106
+ | LiveCodeBench v5<br/>(Pass@1) | 32.9 | 49.1 | 52.3 | 57.8 |
107
+ | LiveCodeBench v6<br/>(Pass@1) | 29.1 | 42.9 | 45.5 | 49.3 |
108
+
109
+ > [!IMPORTANT]
110
+ > The evaluation are conducted with `temperature=0.6`.
111
+ >
112
+ > AIME24 and AIME25 are with averaged score of 32 repetitions. LiveCodeBench v5 (20240801-20250201), LiveCodeBench v6 (20250201-20250501), GPQA-Diamond and IF-Eval are with averaged score of 8 repetitions. MATH500 and SuperGPQA are with a single run.
113
+
114
+ ## IV. Deployment
115
+
116
+ ### vLLM inference
117
+
118
+ 1. [Recommended] We official support inference with MiMo-MTP using [our fork of vLLM](https://github.com/XiaomiMiMo/vllm/tree/feat_mimo_mtp).
119
+
120
+ Example script
121
+
122
+ ```py
123
+ from vllm import LLM, SamplingParams
124
+
125
+ model_path = "/path/to/MiMo"
126
+ llm = LLM(
127
+ model=model_path,
128
+ trust_remote_code=True,
129
+ num_speculative_tokens=1,
130
+ disable_log_stats=False
131
+ )
132
+ sampling_params = SamplingParams(temperature=0.6)
133
+
134
+ conversation = [
135
+ {
136
+ "role": "system",
137
+ "content": ""
138
+ },
139
+ {
140
+ "role": "user",
141
+ "content": "Write an essay about the importance of higher education.",
142
+ },
143
+ ]
144
+
145
+ outputs = llm.chat(conversation,
146
+ sampling_params=sampling_params,
147
+ use_tqdm=False)
148
+
149
+ for output in outputs:
150
+ prompt = output.prompt
151
+ generated_text = output.outputs[0].text
152
+ print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}")
153
+
154
+ print("=" * 80)
155
+ ```
156
+
157
+ 2. Or, you can register a vLLM loader for MiMo without loading MTP parameters.
158
+
159
+ You can copy the [`registry/register_mimo_in_vllm.py`](https://github.com/XiaomiMiMo/MiMo/blob/main/registry/register_mimo_in_vllm.py) to your directory and import it with
160
+
161
+ ```py
162
+ import register_mimo_in_vllm
163
+
164
+ from vllm import LLM, SamplingParams
165
+
166
+ model_path = "/path/to/MiMo"
167
+ llm = LLM(
168
+ model=model_path,
169
+ trust_remote_code=True,
170
+ # num_speculative_tokens=1,
171
+ disable_log_stats=False
172
+ )
173
+ sampling_params = SamplingParams(temperature=0.6)
174
+ ```
175
+
176
+ ### HuggingFace inference
177
+
178
+ Example script
179
+
180
+ ```py
181
+ from transformers import AutoModel, AutoModelForCausalLM, AutoTokenizer
182
+
183
+ model_path = "/path/to/MiMo"
184
+ model = AutoModelForCausalLM.from_pretrained(model_path, trust_remote_code=True)
185
+ tokenizer = AutoTokenizer.from_pretrained(model_path)
186
+ inputs = tokenizer(["Today is"], return_tensors='pt')
187
+ output = model.generate(**inputs, max_new_tokens = 100)
188
+ print(tokenizer.decode(output.tolist()[0]))
189
+ ```
190
+
191
+ ### Recommended environment and prompts
192
+
193
+ - We recommend using [our fork of vLLM](https://github.com/XiaomiMiMo/vllm/tree/feat_mimo_mtp) which is developed based on vLLM 0.7.3.
194
+ - We recommend using empty system prompt.
195
+
196
+ > We haven't verified MiMo with other inference engines and welcome contributions based on the model definition in the Huggingface repo πŸ’».
197
+
198
+ ## V. Citation
199
+
200
+ ```bibtex
201
+ @misc{xiaomi2025mimo,
202
+ title={MiMo: Unlocking the Reasoning Potential of Language Model – From Pretraining to Posttraining},
203
+ author={{Xiaomi LLM-Core Team}},
204
+ year={2025},
205
+ primaryClass={cs.CL},
206
+ url={https://github.com/XiaomiMiMo/MiMo},
207
+ }
208
+ ```
209
+
210
+
211
+ ## VI. Contact
212
+
213
+ Please contact us at [[email protected]](mailto:[email protected]) or open an issue if you have any questions.