Instructions to use mlx-community/Qwen3.5-122B-A10B-OptiQ-2bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/Qwen3.5-122B-A10B-OptiQ-2bit 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/Qwen3.5-122B-A10B-OptiQ-2bit") 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/Qwen3.5-122B-A10B-OptiQ-2bit 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/Qwen3.5-122B-A10B-OptiQ-2bit"
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/Qwen3.5-122B-A10B-OptiQ-2bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use mlx-community/Qwen3.5-122B-A10B-OptiQ-2bit 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/Qwen3.5-122B-A10B-OptiQ-2bit"
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/Qwen3.5-122B-A10B-OptiQ-2bit
Run Hermes
hermes
- MLX LM
How to use mlx-community/Qwen3.5-122B-A10B-OptiQ-2bit 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/Qwen3.5-122B-A10B-OptiQ-2bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "mlx-community/Qwen3.5-122B-A10B-OptiQ-2bit" # 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/Qwen3.5-122B-A10B-OptiQ-2bit", "messages": [ {"role": "user", "content": "Hello"} ] }'
mlx-community/Qwen3.5-122B-A10B-OptiQ-2bit
Built with mlx-optiq, the MLX-native toolkit to quantize, fine-tune, and serve LLMs locally on Apple Silicon, no PyTorch and no cloud. Read the write-up · All OptiQ quants · Docs
A 122-billion-parameter model that runs on a 36 GB Mac. This is a 2-bit mixed-precision MLX quant of Qwen3.5-122B-A10B (244 GB at bf16), produced by mlx-optiq. It is 44 GB on disk. While it generates, only ~12 GB sits in RAM: the attention, router and embeddings stay resident, and the 35 GB of mixture-of-experts weights stream off the SSD one expert at a time through optiq serve --stream-experts.
Asked to write Flappy Bird in a single HTML file, the 2-bit model produced a complete, working game. Here it is playing it:
What it is
| Property | Value |
|---|---|
| Base | Qwen3.5-122B-A10B (122 B total, ~10 B active per token, 256 experts/layer) |
| Method | OptiQ static — structural per-layer bit allocation, no calibration |
| Bit-widths | 4-bit on attention / router / embeddings / first+last block, 2-bit on the routed experts |
| Achieved bits-per-weight | 2.50 |
| On disk | 44 GB |
| Resident while running | ~12 GB (experts streamed) |
| Decode speed | ~5 tok/s on an M3 Max (36 GB) |
The allocation is rule-based: for a 122 B MoE, exact calibration-driven sensitivity would run for days and needs the full model resident as a reference, so OptiQ's static method assigns bits from architecture alone. On small models it matches the calibration method at a fraction of the cost (see the methods comparison).
Run it
This is a Qwen3.5 MoE (model_type: qwen3_5_moe), so it needs mlx-lm from main and import optiq (the MoE text tower postdates the 0.31.3 PyPI release; the main build also reports 0.31.3, so install from git, not a version pin):
pip install -U mlx-optiq "mlx-lm @ git+https://github.com/ml-explore/mlx-lm.git"
Serve it with SSD expert streaming (auto-enabled for a MoE too big to fit resident; --stream-experts forces it):
optiq serve --model mlx-community/Qwen3.5-122B-A10B-OptiQ-2bit --stream-experts
Then open the Lab, ask for a game, and watch it render in the Canvas pane. Streaming keeps the residency flat (~12 GB) no matter how large the model on disk is, at the cost of per-token expert reads (decode is I/O-bound).
Notes
This is an extreme quant. 2-bit on the experts is lossy, and the point of this artifact is that a 122 B model runs at all on consumer Apple Silicon, with coherent output. For reference quality on this base, use a higher-bit quant (Qwen3.5-122B-A10B-4bit and up). The full story is in the blog post.
- Downloads last month
- 182
4-bit
Model tree for mlx-community/Qwen3.5-122B-A10B-OptiQ-2bit
Base model
mlx-community/Qwen3.5-122B-A10B-bf16