Text Generation
MLX
Safetensors
minimax_m2
jang
minimax
Mixture of Experts
apple-silicon
conversational
custom_code
Instructions to use JANGQ-AI/MiniMax-M2.7-JANG_3L with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use JANGQ-AI/MiniMax-M2.7-JANG_3L 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("JANGQ-AI/MiniMax-M2.7-JANG_3L") 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 JANGQ-AI/MiniMax-M2.7-JANG_3L with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "JANGQ-AI/MiniMax-M2.7-JANG_3L"
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": "JANGQ-AI/MiniMax-M2.7-JANG_3L" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use JANGQ-AI/MiniMax-M2.7-JANG_3L 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 "JANGQ-AI/MiniMax-M2.7-JANG_3L"
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 JANGQ-AI/MiniMax-M2.7-JANG_3L
Run Hermes
hermes
- OpenClaw new
How to use JANGQ-AI/MiniMax-M2.7-JANG_3L with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "JANGQ-AI/MiniMax-M2.7-JANG_3L"
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 "JANGQ-AI/MiniMax-M2.7-JANG_3L" \ --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 JANGQ-AI/MiniMax-M2.7-JANG_3L with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "JANGQ-AI/MiniMax-M2.7-JANG_3L"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "JANGQ-AI/MiniMax-M2.7-JANG_3L" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JANGQ-AI/MiniMax-M2.7-JANG_3L", "messages": [ {"role": "user", "content": "Hello"} ] }'
File size: 5,889 Bytes
eaacca1 8bc2abf eaacca1 7453923 28c49c8 7453923 eaacca1 81bd1ae eaacca1 81bd1ae eaacca1 81bd1ae eaacca1 81bd1ae eaacca1 81bd1ae eaacca1 81bd1ae eaacca1 81bd1ae eaacca1 90245e5 eaacca1 81bd1ae eaacca1 81bd1ae eaacca1 81bd1ae eaacca1 81bd1ae eaacca1 615de61 eaacca1 81bd1ae eaacca1 8bc2abf 81bd1ae | 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 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | ---
license: other
license_name: minimax-m2.7-non-commercial
license_link: LICENSE
library_name: mlx
tags:
- mlx
- jang
- minimax
- moe
- apple-silicon
pipeline_tag: text-generation
---
> **⚠️ Requires [MLX Studio](https://mlxstudio.com) to run.** Standard `mlx_lm` cannot load mixed-precision JANG models. MLX Studio includes the JANG loader with automatic per-layer bit detection.
>
> Follow us: [X @dealignai](https://x.com/dealignai)
<p align="center">
<img src="mlx-studio-logo.png" alt="MLX Studio" width="400"/>
</p>
<p align="center">
<img src="jangq-logo.png" alt="JANGQ" width="200"/>
</p>
<div align="center">
# MiniMax-M2.7 JANG_3L
**MiniMax M2.7 228B MoE — 3.08-bit mixed precision, 89 GB**
Best balance of quality and size — fits on 128 GB+ Macs.
</div>
> **Recommended: Run in [MLX Studio](https://mlxstudio.com)** for best experience including thinking mode support and optimized MoE inference.
## Important Settings
MiniMax M2.7 is an always-reasoning model. It thinks before answering on every prompt.
| Setting | Value | Notes |
|---------|-------|-------|
| Temperature | **1.0** | REQUIRED — greedy/temp=0 causes infinite thinking loops |
| Top P | 0.95 | |
| Top K | 40 | |
| Repetition Penalty | 1.1 | Optional, helps prevent loops |
## Model Details
| Metric | Value |
|--------|-------|
| Source | `MiniMaxAI/MiniMax-M2.7` (FP8 E4M3) |
| Architecture | MoE (256 experts, top-8 active), GQA (48 heads / 8 KV), partial RoPE |
| Total Parameters | 228.7B |
| Active Parameters | ~1.4B per token |
| Profile | JANG_3L (CRITICAL=8-bit, IMPORTANT=4-bit, COMPRESS=3-bit) |
| Actual avg bits | 3.08 |
| Model size | 89 GB |
| Format | JANG v2 (MLX-native safetensors, instant load) |
| group_size | 128 (speed-optimized for 256 experts) |
| Routing | Sigmoid + bias correction (not softmax) |
| QK-norm | Full vector RMSNorm |
| Context | 192K tokens |
## JANG_3L Bit Allocation
| Tier | Components | Bits |
|------|-----------|------|
| CRITICAL | Attention (Q/K/V/O), lm_head | 8 |
| IMPORTANT | Embeddings | 4 |
| COMPRESS | Expert MLP (w1/w2/w3) — 98%+ of params | 3 |
| Passthrough | MoE router/gate (float16), norms, QK-norms | 16 |
JANG protects routing and attention at full precision while compressing the 256 expert MLPs — where MoE models are most tolerant of quantization. The router is kept at float16 (no quantization) for maximum routing precision.
## MMLU Comparison — All JANG Profiles (200q, reasoning ON)
| Subject | JANG_2L (63 GB) | JANG_3L (89 GB) | JANG_4M (115 GB) | JANG_6M (167 GB) |
|---------|:-:|:-:|:-:|:-:|
| Abstract Algebra | 16/20 | 19/20 | 19/20 | — |
| Anatomy | 17/20 | 18/20 | **20/20** | — |
| Astronomy | 19/20 | 19/20 | 19/20 | — |
| College CS | 17/20 | 19/20 | 19/20 | — |
| College Physics | 16/20 | **20/20** | **20/20** | — |
| HS Biology | 19/20 | **20/20** | 19/20 | — |
| HS Chemistry | 16/20 | 19/20 | 19/20 | — |
| HS Mathematics | 18/20 | **20/20** | **20/20** | — |
| Logical Fallacies | 19/20 | 19/20 | 18/20 | — |
| World Religions | 19/20 | 18/20 | 18/20 | — |
| **TOTAL** | **176/200 (88.0%)** | **191/200 (95.5%)** | **191/200 (95.5%)** | **≥95.5%** |
| **GPU RAM** | **62.6 GB** | **88.6 GB** | **114.8 GB** | **167.2 GB** |
JANG_6M not benchmarked due to slow generation (~20 tok/s). Near-lossless 6-bit expected to match or exceed 4M/3L.
## Why JANG for MiniMax
Standard MLX quantization on MiniMax produces **completely broken output at ALL bit levels** (~25% MMLU = random guessing). JANG's mixed-precision approach is the **only working quantized MiniMax on Apple Silicon**.
On M2.5, JANG_2L achieved **74% MMLU** vs MLX's 25% (random). M2.7 results pending.
## All Quantizations
| Model | Profile | Size | Avg Bits |
|-------|---------|------|----------|
| [JANG_2L](https://huggingface.co/JANGQ-AI/MiniMax-M2.7-JANG_2L) | (8, 6, 2) | 63 GB | 2.10 |
| [JANG_3L](https://huggingface.co/JANGQ-AI/MiniMax-M2.7-JANG_3L) | (8, 4, 3) | 89 GB | 3.08 |
| [JANG_4M](https://huggingface.co/JANGQ-AI/MiniMax-M2.7-JANG_4M) | (8, 4, 4) | 115 GB | 4.06 |
| [JANG_6M](https://huggingface.co/JANGQ-AI/MiniMax-M2.7-JANG_6M) | (8, 6, 6) | 167 GB | 6.03 |
## Requirements
- Apple Silicon Mac with 128 GB unified memory
- MLX framework
- [MLX Studio](https://mlxstudio.com) recommended
## Tool Use / Agent Mode
MiniMax M2.7 uses **interleaved thinking + tool calls** — it reasons inside `<think>` blocks, then emits tool calls in `<minimax:tool_call>` format. Some clients (Opencode, etc.) may strip the `<think>` block and miss the tool call.
**For tool-use clients**, set `enable_thinking=False` in the chat template:
```python
text = tokenizer.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True,
enable_thinking=False # skips <think> injection for tool-use
)
```
MiniMax tool call format:
```xml
<minimax:tool_call>
<invoke name="tool_name">
<parameter name="param1">value1</parameter>
</invoke>
</minimax:tool_call>
```
## Usage
```python
from jang_tools.loader import load_jang_model
from mlx_lm import generate
from mlx_lm.sample_utils import make_sampler
model, tokenizer = load_jang_model("JANGQ-AI/MiniMax-M2.7-JANG_3L")
sampler = make_sampler(temp=1.0, top_p=0.95)
prompt = tokenizer.apply_chat_template(
[{"role": "user", "content": "What is photosynthesis?"}],
tokenize=False, add_generation_prompt=True
)
output = generate(model, tokenizer, prompt=prompt, max_tokens=2048, sampler=sampler)
print(output)
```
---
## Support
[MLX Studio](https://mlxstudio.com) | [JANGQ](https://jangq.ai) | [X @dealignai](https://x.com/dealignai)
Quantized by Jinho Jang (eric@jangq.ai) using JANG Tools v2.4.1.
---
*This model is licensed under the MiniMax M2.7 Non-Commercial License. Commercial use requires prior written authorization from MiniMax (api@minimax.io). See LICENSE file for full terms.*
|