Text Generation
Transformers
Safetensors
English
Chinese
mimo_v2
multimodal
vision-language
audio
agent
video-understanding
long-context
conversational
custom_code
Eval Results
8-bit precision
fp8
Instructions to use XiaomiMiMo/MiMo-V2.6-Flash-RL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use XiaomiMiMo/MiMo-V2.6-Flash-RL with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="XiaomiMiMo/MiMo-V2.6-Flash-RL", 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.6-Flash-RL", trust_remote_code=True, device_map="auto") - Inference
- HuggingChat
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use XiaomiMiMo/MiMo-V2.6-Flash-RL with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "XiaomiMiMo/MiMo-V2.6-Flash-RL" # 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.6-Flash-RL", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/XiaomiMiMo/MiMo-V2.6-Flash-RL
- SGLang
How to use XiaomiMiMo/MiMo-V2.6-Flash-RL 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.6-Flash-RL" \ --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.6-Flash-RL", "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.6-Flash-RL" \ --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.6-Flash-RL", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use XiaomiMiMo/MiMo-V2.6-Flash-RL with Docker Model Runner:
docker model run hf.co/XiaomiMiMo/MiMo-V2.6-Flash-RL
File size: 3,868 Bytes
6fa50b3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | {%- macro render_value(value) -%}
{%- if value is string -%}
{{- value -}}
{%- else -%}
{{- value | tojson(ensure_ascii=False) -}}
{%- endif -%}
{%- endmacro -%}
{%- macro render_content(message_content) -%}
{%- if message_content is string -%}
{{- message_content -}}
{%- elif message_content is iterable -%}
{%- for part in message_content -%}
{%- if part is not mapping -%}
{{- part -}}
{%- elif part['type'] == 'image' or 'image' in part or 'image_url' in part -%}
{{- '<|vision_start|><|image_pad|><|vision_end|>' -}}
{%- elif part['type'] == 'audio' or part['type'] == 'input_audio' or 'audio' in part or 'audio_url' in part or 'input_audio' in part -%}
{{- '<|mimo_audio_start|><|audio_pad|><|mimo_audio_end|>' -}}
{%- elif part['type'] == 'video' or 'video' in part or 'video_url' in part -%}
{{- '<|vision_start|><|video_pad|><|vision_end|>' -}}
{%- elif 'text' in part -%}
{{- part['text'] -}}
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{%- endmacro -%}
{%- macro render_tools(tools) -%}
{{- 'You are provided with the following tools:\n\n<tools>' -}}
{%- for tool in tools -%}
{{- '\n' ~ (tool | tojson(ensure_ascii=False)) -}}
{%- endfor -%}
{{- '\n</tools>' -}}
{%- endmacro -%}
{%- macro render_tool_calls(tool_calls) -%}
{%- for tool_call in tool_calls -%}
{%- if tool_call.function is defined -%}
{%- set tool_call = tool_call.function -%}
{%- elif tool_call.custom is defined -%}
{%- set tool_call = tool_call.custom -%}
{%- endif -%}
{{- '<tool_call><function=' ~ tool_call.name ~ '>' -}}
{%- if tool_call.input is defined and tool_call.input is string -%}
{{- tool_call.input -}}
{%- elif tool_call.arguments -%}
{%- if tool_call.arguments is string -%}
{{- tool_call.arguments -}}
{%- else -%}
{%- for args_name, args_value in tool_call.arguments | items -%}
{{- '<parameter=' ~ args_name ~ '>' ~ render_value(args_value) ~ '</parameter>' -}}
{%- endfor -%}
{%- endif -%}
{%- endif -%}
{{- '</function></tool_call>' -}}
{%- endfor -%}
{%- endmacro -%}
{%- macro render_assistant_message(message) -%}
{%- set content = render_content(message.content) -%}
{%- set reasoning = message.reasoning_content if message.reasoning_content is string else '' -%}
{{- '<|im_start|>assistant\n<think>' ~ reasoning ~ '</think>' ~ content -}}
{%- if message.tool_calls is defined and message.tool_calls is iterable and message.tool_calls | length > 0 -%}
{{- render_tool_calls(message.tool_calls) -}}
{%- endif -%}
{{- '<|im_end|>' -}}
{%- endmacro -%}
{%- if tools is defined and tools is iterable and tools | length > 0 -%}
{{- '<|im_start|>system\n' ~ render_tools(tools) ~ '<|im_end|>' -}}
{%- endif -%}
{%- for message in messages -%}
{%- if message.role == 'assistant' -%}
{{- render_assistant_message(message) -}}
{%- else -%}
{%- set body = render_content(message.content) -%}
{{- '<|im_start|>' ~ message.role ~ '\n' ~ body -}}
{%- if message.tools is defined and message.tools is iterable and message.tools | length > 0 -%}
{%- if body -%}
{{- '\n\n' -}}
{%- endif -%}
{{- render_tools(message.tools) -}}
{%- endif -%}
{{- '<|im_end|>' -}}
{%- endif -%}
{%- endfor -%}
{%- if add_generation_prompt -%}
{{- '<|im_start|>assistant\n' -}}
{%- if enable_thinking is false -%}
{{- '<think></think>' -}}
{%- endif -%}
{%- endif -%}
|