Instructions to use mlx-community/Mellum2-12B-A2.5B-Thinking-8bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/Mellum2-12B-A2.5B-Thinking-8bit 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/Mellum2-12B-A2.5B-Thinking-8bit") 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/Mellum2-12B-A2.5B-Thinking-8bit 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/Mellum2-12B-A2.5B-Thinking-8bit"
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": "mlx-community/Mellum2-12B-A2.5B-Thinking-8bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use mlx-community/Mellum2-12B-A2.5B-Thinking-8bit 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/Mellum2-12B-A2.5B-Thinking-8bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "mlx-community/Mellum2-12B-A2.5B-Thinking-8bit" # 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/Mellum2-12B-A2.5B-Thinking-8bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use mlx-community/Mellum2-12B-A2.5B-Thinking-8bit 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/Mellum2-12B-A2.5B-Thinking-8bit"
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/Mellum2-12B-A2.5B-Thinking-8bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use mlx-community/Mellum2-12B-A2.5B-Thinking-8bit 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/Mellum2-12B-A2.5B-Thinking-8bit"
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/Mellum2-12B-A2.5B-Thinking-8bit" \ --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"
Mellum2 12B A2.5B Thinking - 8-bit MLX
This is an 8-bit affine MLX quantization of JetBrains/Mellum2-12B-A2.5B-Thinking.
Mellum2 Thinking is a reasoning-augmented Mixture-of-Experts assistant model.
It has 64 experts with 8 active per token, a 131,072-token context window, and
emits reasoning in <think>...</think> blocks before the final answer.
Conversion details
- Source:
JetBrains/Mellum2-12B-A2.5B-Thinking - Format: MLX safetensors
- Quantization: affine, 8 bits, group size 64
- License: Apache-2.0
- EOS token:
<|im_end|>(token ID 28)
The upstream config.json and generation_config.json identify token ID 0 as
the EOS token, while the tokenizer identifies <|im_end|> (ID 28) as EOS.
This conversion uses token ID 28 so MLX generation stops at the end of the
assistant turn.
Usage
pip install -U mlx-lm
mlx_lm.chat \
--model mlx-community/Mellum2-12B-A2.5B-Thinking-8bit \
--max-tokens 8192 \
--temp 0.6 \
--top-p 0.95
Benchmarks
Benchmarked with oMLX 0.5.7 and MLX-LM 0.31.3 on an Apple M5 Max MacBook Pro with 128 GB unified memory, using the built-in Python-code workload and 128 generated tokens. Results vary with hardware, runtime versions, context length, and generation settings.
| Prompt tokens | TTFT | Prefill | Generation | End-to-end | Peak memory |
|---|---|---|---|---|---|
| 4,096 | 926.4 ms | 4,421.3 tok/s | 132.3 tok/s | 1.9 s | 12.7 GB |
| 16,384 | 3,205.2 ms | 5,111.8 tok/s | 121.8 tok/s | 4.3 s | 13.0 GB |
| 32,768 | 8,171.5 ms | 4,010.0 tok/s | 112.9 tok/s | 9.3 s | 13.4 GB |
| 65,536 | 22,286.9 ms | 2,940.6 tok/s | 92.9 tok/s | 23.7 s | 14.1 GB |
| 131,072 | 67,675.6 ms | 1,936.8 tok/s | 56.0 tok/s | 70.0 s | 15.5 GB |
At a 4,096-token prompt, batch generation achieved 176.4, 189.3, and 222.8 aggregate generation tok/s at 2, 4, and 8 concurrent requests, respectively, compared with 132.3 tok/s for one request.
Model provenance
For the original model card, training details, benchmark results, and usage guidance, see the upstream JetBrains checkpoint.
- Downloads last month
- 40
8-bit
Model tree for mlx-community/Mellum2-12B-A2.5B-Thinking-8bit
Base model
JetBrains/Mellum2-12B-A2.5B-Thinking