Instructions to use majentik/Mistral-Small-4-119B-RotorQuant-MLX-8bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use majentik/Mistral-Small-4-119B-RotorQuant-MLX-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("majentik/Mistral-Small-4-119B-RotorQuant-MLX-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
- LM Studio
- Pi new
How to use majentik/Mistral-Small-4-119B-RotorQuant-MLX-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 "majentik/Mistral-Small-4-119B-RotorQuant-MLX-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": "majentik/Mistral-Small-4-119B-RotorQuant-MLX-8bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use majentik/Mistral-Small-4-119B-RotorQuant-MLX-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 "majentik/Mistral-Small-4-119B-RotorQuant-MLX-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 majentik/Mistral-Small-4-119B-RotorQuant-MLX-8bit
Run Hermes
hermes
- MLX LM
How to use majentik/Mistral-Small-4-119B-RotorQuant-MLX-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 "majentik/Mistral-Small-4-119B-RotorQuant-MLX-8bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "majentik/Mistral-Small-4-119B-RotorQuant-MLX-8bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "majentik/Mistral-Small-4-119B-RotorQuant-MLX-8bit", "messages": [ {"role": "user", "content": "Hello"} ] }'
Mistral-Small-4-119B-RotorQuant-MLX-8bit
Dual compression: 8-bit MLX weight quantization + RotorQuant KV cache quantization for Mistral Small 4 on Apple Silicon.
This repository provides an 8-bit weight-quantized MLX conversion of mistralai/Mistral-Small-4-119B-2603 with RotorQuant KV cache quantization support. Designed for efficient inference on Apple Silicon Macs with excellent throughput.
Approximate model size: ~120 GB
Overview
This model applies two complementary compression techniques:
- 8-bit weight quantization (MLX) -- reduces model weights from ~238 GB to ~120 GB
- RotorQuant KV cache quantization -- reduces KV cache from ~32 GB to ~6.5 GB at 256K context
Together, these make it feasible to run a 119B-parameter MoE model on high-memory Apple Silicon machines with excellent throughput.
Model Specs
| Property | Value |
|---|---|
| Base Model | Mistral Small 4 (March 2026) |
| Total Parameters | 119B |
| Active Parameters | 6.5B per token (Sparse MoE) |
| Architecture | Sparse MoE -- 128 experts, 4 active per token |
| Context Length | 256K tokens |
| Modality | Text + Images (multimodal) |
| Capabilities | Thinking / reasoning, tool use, multilingual |
| License | Apache 2.0 |
| Weight Quantization | 8-bit (MLX) |
| KV Cache Quantization | RotorQuant 3-bit |
Memory Estimates
| Configuration | Weights | KV Cache (256K) | Total |
|---|---|---|---|
| FP16 baseline | ~238 GB | ~32 GB | ~270 GB |
| This model (8-bit MLX + RotorQuant) | ~120 GB | ~6.5 GB | ~126.5 GB |
Note: This is a Sparse MoE model -- only 6.5B parameters are active per token, so inference is fast despite the 119B total parameter count.
Quickstart
from mlx_lm import load, generate
model, tokenizer = load("majentik/Mistral-Small-4-119B-RotorQuant-MLX-8bit")
prompt = "Explain sparse mixture-of-experts architectures."
messages = [{"role": "user", "content": prompt}]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
response = generate(model, tokenizer, prompt=text, max_tokens=512)
print(response)
What is RotorQuant?
RotorQuant is a rotation-based KV cache quantization method that applies learned Clifford algebra rotations before quantizing the key-value cache. Key results:
- 5.3x faster prefill compared to TurboQuant baseline
- 28% faster decode throughput
- Perplexity: 6.91 vs 7.07 for TurboQuant (lower is better)
Because it targets the KV cache rather than weights, it stacks with weight quantization for compounding memory savings.
KV-Cache Quantization Comparison
| Method | Prefill Speed | Decode Speed | Memory Savings | Reference |
|---|---|---|---|---|
| TurboQuant | Baseline | Baseline | High | arXiv: 2504.19874 |
| RotorQuant | 5.3x faster | 28% faster | High | GitHub |
Hardware Requirements
This model requires approximately 127 GB total memory at 256K context. Recommended hardware:
- Apple M2 Ultra (192 GB+)
- Apple M3/M4 Ultra (192 GB+)
- Mac Pro
See Also
- mistralai/Mistral-Small-4-119B-2603 -- Base model
- majentik/Mistral-Small-4-119B-RotorQuant -- KV cache only (no weight quantization)
- majentik/Mistral-Small-4-119B-RotorQuant-MLX-4bit -- 4-bit MLX variant
- majentik/Mistral-Small-4-119B-RotorQuant-MLX-2bit -- 2-bit MLX variant
- majentik/Mistral-Small-4-119B-TurboQuant-MLX-8bit -- TurboQuant MLX 8-bit variant
- RotorQuant GitHub
- MLX Framework
- Downloads last month
- 188
8-bit
Model tree for majentik/Mistral-Small-4-119B-RotorQuant-MLX-8bit
Base model
mistralai/Mistral-Small-4-119B-2603