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)# 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=40) 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
Add files using upload-large-folder tool
Browse files- model_1.safetensors +3 -0
- model_10_linear_fc1.safetensors +3 -0
- model_11_linear_fc1.safetensors +3 -0
- model_13.safetensors +3 -0
- model_15.safetensors +3 -0
- model_15_linear_fc1.safetensors +3 -0
- model_17.safetensors +3 -0
- model_18.safetensors +3 -0
- model_19.safetensors +3 -0
- model_1_linear_fc1.safetensors +3 -0
- model_20_linear_fc1.safetensors +3 -0
- model_24_linear_fc1.safetensors +3 -0
- model_25.safetensors +3 -0
- model_27_linear_fc1.safetensors +3 -0
- model_28.safetensors +3 -0
- model_29.safetensors +3 -0
- model_3.safetensors +3 -0
- model_32.safetensors +3 -0
- model_36.safetensors +3 -0
- model_37.safetensors +3 -0
- model_38.safetensors +3 -0
- model_39.safetensors +3 -0
- model_40.safetensors +3 -0
- model_41.safetensors +3 -0
- model_42.safetensors +3 -0
- model_43.safetensors +3 -0
- model_46.safetensors +3 -0
- model_6_linear_fc1.safetensors +3 -0
- model_9_linear_fc1.safetensors +3 -0
- model_mtp.safetensors +3 -0
model_1.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ac9b00d805466265c6cc7208958532d2819c3d6b73e8a551cbe71f1196ef6675
|
| 3 |
+
size 132154312
|
model_10_linear_fc1.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b79a6754a6ceffd3b1164847e6371fe94f74cd44b9f8a177976dff8fb25f6ada
|
| 3 |
+
size 4296144144
|
model_11_linear_fc1.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c73f4786cc52b659e8e8c0693b8f1c70d14f6982618136b9b797c3f0a52bb5a5
|
| 3 |
+
size 4296144144
|
model_13.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:744ba55216e1d1f8651770266130e3a1d4d62f06fbc076c6f739c8279c7274ed
|
| 3 |
+
size 132154328
|
model_15.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9dcccb45364d69afab25fb0837befdb80a13257a7491bdd3ba6b83b3c5a1555d
|
| 3 |
+
size 132154328
|
model_15_linear_fc1.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e44d6af2fe49e8c00c207b6e5ef5cd2078413b0dde93571f7c67d65ed8129393
|
| 3 |
+
size 4296144144
|
model_17.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3cbfd9461946facfe56dfdf14222aa8a4a3d8b19ef4c32b1c814f1b42cbee113
|
| 3 |
+
size 126910184
|
model_18.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a277cf00ce1bc93147ca00f4f5fe09a72ac9ed27973e9a87960494d6ef90908a
|
| 3 |
+
size 132154328
|
model_19.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9b6dc3861aa3176eda4cae4b82cb4a347bfb2bbddad7245202f6eff5ee89e7c9
|
| 3 |
+
size 132154328
|
model_1_linear_fc1.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:de58f252388fc33c62a3cc709d98996d0d56c9046068f22aa6e9d7861294e579
|
| 3 |
+
size 4296143120
|
model_20_linear_fc1.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e98dab38464b91238ebbc7dcb720a879f466b1d9eaadb817b31b123df0e8ef46
|
| 3 |
+
size 4296144144
|
model_24_linear_fc1.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:391028a2c88ce18b77d8b997c7a037ae009521a7bec0b82f14e7043ed9b17970
|
| 3 |
+
size 4296144144
|
model_25.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:45db88629a7c9c335e1415effea339410d5b2b909a94cd213b89dfee7dd90152
|
| 3 |
+
size 132154328
|
model_27_linear_fc1.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:20b41d53343f4ae5648c0537e8e9003b6e892b6b8a7e364df2c6e2d3dad2cbc4
|
| 3 |
+
size 4296144144
|
model_28.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4ef526fa88dd000c574c5c630646199b79718644416f10921c73ebc2c8663769
|
| 3 |
+
size 132154328
|
model_29.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4063e1b6af050d9329f1c4b0bc81b39305815379b2ac50622ae9bed65a6b9770
|
| 3 |
+
size 126910184
|
model_3.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d70782091f32a1d03c6430d8598b7a4661881a347cd278d14c5f2c2d40d4ec58
|
| 3 |
+
size 132154312
|
model_32.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fdefe3ca1aad0ea97e615da41e3db4c0d9a2a7bda10e27d81586e3ac92dfeb95
|
| 3 |
+
size 132154328
|
model_36.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:62187f07ad56cf6ecd8a9ef1788c582bde4cf62a5cc3681ad35b2bc8058b59fa
|
| 3 |
+
size 132154328
|
model_37.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:75871d63f2ee5fe2a1132c6c67d63a09822a1e9e5a5380752ee360ddf39a2ad4
|
| 3 |
+
size 132154328
|
model_38.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:db31ce8dc477b5969a64afc4315e1db61cac5bfe170f8663f26b48e5d91948d5
|
| 3 |
+
size 132154328
|
model_39.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:93100c7e967c1790996156e0b0180e3c69db20af15e6b554dfaf798920db543d
|
| 3 |
+
size 132154328
|
model_40.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:69e68652db5d8f5a2320476d1071bc02b63b83389d01d148156152575750487d
|
| 3 |
+
size 132154328
|
model_41.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c75e188601da11490d043c7ab380e136bc9b5b6ebd4834f89e2dbf4f579092c9
|
| 3 |
+
size 126910184
|
model_42.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7ba215fbef12625f59490775b600b4f98bc231b99a6ec94851a184285da861df
|
| 3 |
+
size 132154328
|
model_43.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:359ab913b69715866a70b67caa21717b47254c5542d22c1e92190b3f62c3a709
|
| 3 |
+
size 132154328
|
model_46.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:38b4b7b05aaba53af447fbe6e78e58994498b70e51a60a795776dcbe5c889f32
|
| 3 |
+
size 132154328
|
model_6_linear_fc1.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c996a7ba5c78a4ac6e235a89ee1515820f570d498b40b8c46ae65833b4973e2e
|
| 3 |
+
size 4296143120
|
model_9_linear_fc1.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cb276049eb92c363ca9b23b8ea3d5750dd880582bded71f9b375c0b7f3fe48ca
|
| 3 |
+
size 4296143120
|
model_mtp.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:84d4d1bde2e2fab7b185a768dd6a826b94f16537bbefede9cbe15ec66187140f
|
| 3 |
+
size 1189407384
|