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
- 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
工具调用功能调用第一次成功后,之后回答都是乱码
部署参数如下:
python3 -m sglang.launch_server --model-path /api-models-h20/XiaomiMiMo/MiMo-V2-Flash --served-model-name deepinfer-mimo-v2-flash --tp-size 4 --page-size 1 --host 0.0.0.0 --port 8000 --trust-remote-code --mem-fraction-static 0.9 --max-running-requests 8 --chunked-prefill-size 16384 --reasoning-parser qwen3 --tool-call-parser mimo --context-length 262144 --attention-backend fa3
部署镜像:
lmsysorg/sglang:dev-pr-15207
部署机器:
H20-141G-高级版 88核 4卡 1000内存 141显存
我也有这个问题,部署的mimo无法调用传给他的工具

