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) 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
Domain recognition bias: <a> tags preserved only for amazon URLs
Summary
When asked to reproduce HTML containing multiple <a> tags with
different URL domains, MiMo V2 consistently preserves only URLs
from amzn.to (Amazon's URL shortener) and strips <a> tags
from URLs of other domains, even when the prompt explicitly
instructs to preserve HTML exactly as written.
Reproduction
Given a prompt containing this HTML block:
<div>
<p><a href="https://example1.com/path-a">Link Text 1</a></p>
<p><a href="https://amzn.to/abc123">Link Text 2</a></p>
<p><a href="https://example2.com/path-b">Link Text 3</a></p>
<p><a href="https://example3.net/redirect/xyz">Link Text 4</a></p>
<p><a href="https://example4.org/svt/ref?id=xxxxxx">Link Text 5</a></p>
</div>
Output:
<div>
<p>Link Text 1</p>
<p><a href="https://amzn.to/abc123">Link Text 2</a></p>
<p>Link Text 3</p>
<p>Link Text 4</p>
<p>Link Text 5</p>
</div>
Only the amzn.to URL retains its <a> wrapper.
Tested Variations
- Generic short URLs (
bit.ly/xxx) β stripped - Custom short domain β stripped
- Long URLs with query parameters β stripped
- URLs of varying length (20-80 chars) β stripped
- Amazon long URLs (
amazon.co.jp/dp/XXX?tag=...) β preserved amzn.to/xxxβ preserved
Only amzn.to and amazon.* domains are reliably preserved.
Cross-Model Confirmation
Also reproduced in:
mistralai/mistral-small-creativemistralai/mistral-small-3.2-24b-instruct
This suggests the bias is not vendor-specific but a general
property of mid-tier LLMs trained on web crawl data. Related
discussion filed at:
https://huggingface.co/mistralai/Mistral-Small-3.2-24B-Instruct-2506/discussions/42
Suspected Cause
Training data bias: Amazon URLs appear with disproportionate
frequency in web crawl datasets. The model learned a strong
prior of "amzn.to β wrap in <a>" but lacks the same prior
for other domains.
Why This Matters
Breaks use cases requiring preservation of arbitrary <a> tags:
- E-commerce content with non-Amazon platforms
- Internal docs with company-specific URLs
- Multi-source citations
- Localized content using region-specific platforms
Suggested Improvements
- Augment training data with diverse
<a>tag examples across
many domains - Increase weight of explicit HTML preservation instructions
- Synthetic data to break the Amazon-specific prior
Severity
Medium-High β blocks content generation with non-Amazon links.
Happy to provide more reproduction materials if needed.