Instructions to use KikoCis/minimax-m2-expert-prune-heal with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use KikoCis/minimax-m2-expert-prune-heal with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf KikoCis/minimax-m2-expert-prune-heal # Run inference directly in the terminal: llama cli -hf KikoCis/minimax-m2-expert-prune-heal
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf KikoCis/minimax-m2-expert-prune-heal # Run inference directly in the terminal: llama cli -hf KikoCis/minimax-m2-expert-prune-heal
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf KikoCis/minimax-m2-expert-prune-heal # Run inference directly in the terminal: ./llama-cli -hf KikoCis/minimax-m2-expert-prune-heal
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf KikoCis/minimax-m2-expert-prune-heal # Run inference directly in the terminal: ./build/bin/llama-cli -hf KikoCis/minimax-m2-expert-prune-heal
Use Docker
docker model run hf.co/KikoCis/minimax-m2-expert-prune-heal
- LM Studio
- Jan
- Ollama
How to use KikoCis/minimax-m2-expert-prune-heal with Ollama:
ollama run hf.co/KikoCis/minimax-m2-expert-prune-heal
- Unsloth Desktop
- Pi
How to use KikoCis/minimax-m2-expert-prune-heal with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf KikoCis/minimax-m2-expert-prune-heal
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "KikoCis/minimax-m2-expert-prune-heal" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use KikoCis/minimax-m2-expert-prune-heal with Docker Model Runner:
docker model run hf.co/KikoCis/minimax-m2-expert-prune-heal
- Lemonade
How to use KikoCis/minimax-m2-expert-prune-heal with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull KikoCis/minimax-m2-expert-prune-heal
Run and chat with the model
lemonade run user.minimax-m2-expert-prune-heal-{{QUANT_TAG}}List all available models
lemonade list
- Hermes Agent
How to use KikoCis/minimax-m2-expert-prune-heal with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf KikoCis/minimax-m2-expert-prune-heal
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 KikoCis/minimax-m2-expert-prune-heal
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use KikoCis/minimax-m2-expert-prune-heal with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf KikoCis/minimax-m2-expert-prune-heal
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 "KikoCis/minimax-m2-expert-prune-heal" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
MiniMax-M2 β Expert-Pruned (keep-192/256), GGUF
A research artifact on structurally compressing a 230B Mixture-of-Experts coding agent (MiniMax-M2: 256 experts/layer, top-8) by pruning experts β keeping it a working agent in a real tool-using loop, not just a fluent generator. This is the keep-192 point: 192 of 256 experts kept (top-K by measured code/agentic activation), ~30% smaller, still solves real SWE tasks.
π Full field report: ARTICLE.md.
The headline: capability scales smoothly with the expert budget
Evaluated as a real coding agent (a harness driving the model through a Dockerized repo: read, edit, run tests) on a 6-instance SWE-bench Verified probe set (the exact instances the un-pruned model resolves 6/6), served via Ollama:
| Variant | Size (GGUF) | Experts kept | SWE resolved |
|---|---|---|---|
| Full M2 (IQ2_M) | 78 GB | 256 / 256 | 6 / 6 |
| keep-192 (this repo) | ~55 GB | 192 / 256 | 3 / 6 |
| keep-160 | 46 GB | 160 / 256 | 1 / 6 |
| IQ1 (all experts, 1.8-bit) | 48 GB | 256 / 256 | 0 / 6 |
Two findings worth taking away:
- No cliff β agentic capability degrades smoothly as you remove experts (6 β 3 β 1), it doesn't collapse. You can drop a quarter of the experts and keep half the solving.
- At a fixed size, prune > uniform-extreme-quant β keep-160 (46 GB, 160 experts at ~2.7-bit) resolves where IQ1 (48 GB, all 256 at 1.8-bit) resolves nothing. Concentrating the bit budget on fewer experts beats spreading it thin.
These models are untrained (pure pruned quant, no fine-tune) β so the resolves are genuine compressed-M2 capability, not memorization.
Use it
# Ollama (the GGUF is in this repo):
ollama create m2-pruned192 -f Modelfile
ollama run m2-pruned192
Or point any llama.cpp/GGUF runtime at M2-pruned192-IQ2.gguf. Use a generous context for agent loops (the M2 chat template + stop tokens are baked into the Modelfile).
Reproduce
# Prune the kept experts out of an IQ2_M GGUF of MiniMax-M2 (clean slice, no re-quant):
python prune_gguf_experts.py \
--in MiniMax-M2-IQ2_M.gguf --out M2-pruned192.gguf \
--keep 192 --strategy file --keep-file keep192_experts.json
keep192_experts.json is the per-layer expert keep-set (top-K by measured activation on a code/agentic calibration corpus).
Limitations
- Research artifact, not a production release. At ~55 GB it solves 3/6 of this probe set; the full 78 GB quant solves 6/6 β pruning trades size for capability along the curve above.
- Untrained. A recovery fine-tune ("heal") on top should push it further up the curve (separate work).
- Honest framing: this is not "better than the full model" β it's a smaller point on a clean sizeβcapability curve, and at a fixed budget it beats a same-size uniform low-bit quant.
License
Apache-2.0, inheriting MiniMax-M2's terms. This repo adds a pruning recipe + a pruned GGUF derived from a quantized MiniMax-M2.
- Downloads last month
- 17
We're not able to determine the quantization variants.
Model tree for KikoCis/minimax-m2-expert-prune-heal
Base model
MiniMaxAI/MiniMax-M2