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 AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("XiaomiMiMo/MiMo-V2-Flash", trust_remote_code=True, dtype="auto") - Inference
- HuggingChat
- 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
Infinite CoT (Chain of Thought) Loop / Failure to converge Claude Code
Environment
- CLI:
Claude Code - Issue: Infinite CoT (Chain of Thought) Loop / Failure to converge
- Reference: News 2026-01-12 - Reasoning Support
Severity
π΄ Blocker - The model is effectively unusable with Reasoning enabled.
Description
The mimo-v2-flash model exhibits a critical failure in its reasoning termination logic. Unlike expected behavior where the model thinks and then answers, this model enters an infinite semantic loop inside the thinking block until the hard token limit is hit and the API kills the connection.
Crucially: This happens regardless of the MAX_THINKING_TOKENS or CLAUDE_CODE_MAX_OUTPUT_TOKENS settings.
- Set to 16k? -> Loops for 16k tokens -> API Error.
- Set to 128k? -> Loops for 128k tokens -> API Error.
Reproduction Case
- Send a request requiring logical analysis (e.g., code debugging).
- Enable "Thinking" mode (any budget).
- Observe the output stream.
Actual Result (The Loop of Death)
The model repeats the same diagnostic steps without ever attempting to write the final response.
[Thinking] ...Let's check hkslSetTagForFrame...
[Thinking] ...Maybe the flag is not set...
[Thinking] ...Let's check hkslSetTagForFrame... (Identical repetition)
[Thinking] ...Maybe the flag is not set... (Identical repetition)
...
[System] API Error: Claude's response exceeded the 128001 output token maximum. To configure this behavior, set the CLAUDE_CODE_MAX_OUTPUT_TOKENS environment variable.
Same problem with Xiaomi MiMo-V2-Pro :(