Text Generation
MLX
Safetensors
English
Chinese
mimo_v2
agent
long-context
conversational
custom_code
4-bit precision
Instructions to use mlx-community/MiMo-V2.6-Pro-RL-mxfp4-q8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/MiMo-V2.6-Pro-RL-mxfp4-q8 with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("mlx-community/MiMo-V2.6-Pro-RL-mxfp4-q8") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use mlx-community/MiMo-V2.6-Pro-RL-mxfp4-q8 with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "mlx-community/MiMo-V2.6-Pro-RL-mxfp4-q8"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "mlx-community/MiMo-V2.6-Pro-RL-mxfp4-q8" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use mlx-community/MiMo-V2.6-Pro-RL-mxfp4-q8 with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "mlx-community/MiMo-V2.6-Pro-RL-mxfp4-q8"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "mlx-community/MiMo-V2.6-Pro-RL-mxfp4-q8" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mlx-community/MiMo-V2.6-Pro-RL-mxfp4-q8", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use mlx-community/MiMo-V2.6-Pro-RL-mxfp4-q8 with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "mlx-community/MiMo-V2.6-Pro-RL-mxfp4-q8"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default mlx-community/MiMo-V2.6-Pro-RL-mxfp4-q8
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use mlx-community/MiMo-V2.6-Pro-RL-mxfp4-q8 with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "mlx-community/MiMo-V2.6-Pro-RL-mxfp4-q8"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "mlx-community/MiMo-V2.6-Pro-RL-mxfp4-q8" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
| {%- 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 -%} | |