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-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("mlx-community/Qwen3.5-122B-A10B-OptiQ-2bit") config = load_config("mlx-community/Qwen3.5-122B-A10B-OptiQ-2bit") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - 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
- OpenClaw new
How to use mlx-community/Qwen3.5-122B-A10B-OptiQ-2bit 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/Qwen3.5-122B-A10B-OptiQ-2bit"
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/Qwen3.5-122B-A10B-OptiQ-2bit" \ --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-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.
Image input
It takes images. The SigLIP vision tower rides at bf16 in a sidecar (optiq/optiq_vision.safetensors, 0.90 GB), so the image path keeps full precision while the language tower runs at 2 bits. The tower stays resident; only the experts stream.
Verified on a 36 GB M3 Max with expert streaming on, 11.6 GB resident:
| image | output |
|---|---|
| a red circle on white | "The image contains a red circle." |
| a blue square on white | "The image contains a blue square." |
from PIL import Image
from optiq.runtime.moe_stream import load_streaming
from optiq.runtime.engine import OptiqEngine
model, tok = load_streaming("mlx-community/Qwen3.5-122B-A10B-OptiQ-2bit")
eng = OptiqEngine.from_loaded(model, tok, "mlx-community/Qwen3.5-122B-A10B-OptiQ-2bit")
print(eng.generate("What is in this image?", images=[Image.open("photo.jpg")]).text)
Requires mlx-optiq >= 0.3.3.
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
- 1,093
4-bit
Model tree for mlx-community/Qwen3.5-122B-A10B-OptiQ-2bit
Base model
mlx-community/Qwen3.5-122B-A10B-bf16