Text Generation
MLX
Safetensors
minimax_m3
Mixture of Experts
minimax
minimax-m3
conversational
4-bit precision
Instructions to use pipenetwork/MiniMax-M3-MLX-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use pipenetwork/MiniMax-M3-MLX-4bit 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("pipenetwork/MiniMax-M3-MLX-4bit") 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 pipenetwork/MiniMax-M3-MLX-4bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "pipenetwork/MiniMax-M3-MLX-4bit"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "pipenetwork/MiniMax-M3-MLX-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use pipenetwork/MiniMax-M3-MLX-4bit 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 "pipenetwork/MiniMax-M3-MLX-4bit"
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 pipenetwork/MiniMax-M3-MLX-4bit
Run Hermes
hermes
- OpenClaw new
How to use pipenetwork/MiniMax-M3-MLX-4bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "pipenetwork/MiniMax-M3-MLX-4bit"
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 "pipenetwork/MiniMax-M3-MLX-4bit" \ --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"
- MLX LM
How to use pipenetwork/MiniMax-M3-MLX-4bit with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "pipenetwork/MiniMax-M3-MLX-4bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "pipenetwork/MiniMax-M3-MLX-4bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pipenetwork/MiniMax-M3-MLX-4bit", "messages": [ {"role": "user", "content": "Hello"} ] }'
| license: other | |
| license_name: minimax-community | |
| license_link: LICENSE | |
| base_model: MiniMaxAI/MiniMax-M3 | |
| base_model_relation: quantized | |
| pipeline_tag: text-generation | |
| library_name: mlx | |
| tags: | |
| - mlx | |
| - moe | |
| - minimax | |
| - minimax-m3 | |
| - text-generation | |
| # MiniMax-M3-MLX-4bit | |
| **Built with MiniMax M3.** | |
| This is an **MLX** (Apple Silicon) conversion of | |
| [MiniMaxAI/MiniMax-M3](https://huggingface.co/MiniMaxAI/MiniMax-M3), quantized to | |
| **4-bit (balanced default)**. | |
| It is a **text-only** extraction of the M3 backbone (the vision tower, multimodal | |
| projector and multi-token-prediction heads are not included). The model is a | |
| ~427B-parameter Mixture-of-Experts (128 experts, top-4, + 1 shared expert; first | |
| 3 layers dense), with per-head QK-norm, partial RoPE, Gemma-style RMSNorm and the | |
| SwiGLU-OAI activation. | |
| ## Quantizations | |
| Part of the [**MiniMax-M3 MLX** collection](https://huggingface.co/collections/pipenetwork/minimax-m3-mlx-6a2d7776d4e2a69aad841516). | |
| | Variant | Size | Notes | | |
| |---|---|---| | |
| | [8-bit](https://huggingface.co/pipenetwork/MiniMax-M3-MLX-8bit) | ~453 GB | near-lossless | | |
| | [6-bit](https://huggingface.co/pipenetwork/MiniMax-M3-MLX-6bit) | ~346 GB | high quality | | |
| | **4-bit** (this repo) | ~240 GB | balanced default | | |
| | [3-bit](https://huggingface.co/pipenetwork/MiniMax-M3-MLX-3bit) | ~186 GB | smallest | | |
| | [mixed-3_6bit](https://huggingface.co/pipenetwork/MiniMax-M3-MLX-mixed-3_6bit) | ~191 GB | experts@3-bit, attn/embeds/router@6-8-bit · best quality-per-GB | | |
| ## Attention / context note | |
| MiniMax Sparse Attention (MSA) is implemented here as **full causal attention**. | |
| This is numerically exact for sequences up to 2048 tokens (MSA selects every key | |
| block at that length) and is the dense, un-approximated attention that MSA | |
| approximates beyond it — so quality is preserved, at the cost of MSA's | |
| long-context speed/memory savings. | |
| ## Use with mlx-lm | |
| ```bash | |
| pip install mlx-lm | |
| ``` | |
| This build requires the `minimax_m3` model class | |
| ([`mlx_lm/models/minimax_m3.py`](https://huggingface.co/pipenetwork/MiniMax-M3-MLX-4bit/blob/main/minimax_m3.py), | |
| included in this repo — copy it into your `mlx_lm/models/` directory). | |
| ```python | |
| from mlx_lm import load, generate | |
| model, tokenizer = load("pipenetwork/MiniMax-M3-MLX-4bit") | |
| prompt = tokenizer.apply_chat_template( | |
| [{"role": "user", "content": "Explain Mixture-of-Experts in one paragraph."}], | |
| add_generation_prompt=True, | |
| ) | |
| print(generate(model, tokenizer, prompt=prompt, max_tokens=256, verbose=True)) | |
| ``` | |
| ## License | |
| Released under the **MiniMax Community License** (see `LICENSE`). Use is | |
| **non-commercial** by default; commercial use requires displaying | |
| "Built with MiniMax M3" and may require prior authorization from MiniMax — see the | |
| license text for details. | |
| ## Provenance | |
| Converted from the BF16 checkpoint with `mlx-lm` quantization. Quantization | |
| config: `{"group_size": 64, "bits": 4, "mode": "affine", "model.layers.3.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.4.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.5.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.6.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.7.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.8.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.9.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.10.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.11.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.12.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.13.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.14.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.15.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.16.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.17.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.18.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.19.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.20.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.21.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.22.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.23.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.24.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.25.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.26.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.27.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.28.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.29.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.30.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.31.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.32.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.33.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.34.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.35.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.36.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.37.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.38.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.39.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.40.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.41.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.42.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.43.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.44.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.45.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.46.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.47.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.48.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.49.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.50.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.51.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.52.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.53.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.54.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.55.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.56.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.57.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.58.block_sparse_moe.gate": {"group_size": 64, "bits": 8}, "model.layers.59.block_sparse_moe.gate": {"group_size": 64, "bits": 8}}`. | |