Instructions to use mlx-community/Qwen3.6-35B-A3B-OptiQ-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/Qwen3.6-35B-A3B-OptiQ-4bit 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.6-35B-A3B-OptiQ-4bit") 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.6-35B-A3B-OptiQ-4bit 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.6-35B-A3B-OptiQ-4bit"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/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.6-35B-A3B-OptiQ-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use mlx-community/Qwen3.6-35B-A3B-OptiQ-4bit 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.6-35B-A3B-OptiQ-4bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "mlx-community/Qwen3.6-35B-A3B-OptiQ-4bit" # 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.6-35B-A3B-OptiQ-4bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use mlx-community/Qwen3.6-35B-A3B-OptiQ-4bit 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.6-35B-A3B-OptiQ-4bit"
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.6-35B-A3B-OptiQ-4bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use mlx-community/Qwen3.6-35B-A3B-OptiQ-4bit 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.6-35B-A3B-OptiQ-4bit"
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.6-35B-A3B-OptiQ-4bit" \ --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"
What is the reason to use this model instead of simple mlx 4 bit?
Please explain; I didn't get it. On the provided benchmark, it has 89 vs. 91 for the basic 4-bit version of this model. And it seems to have the same size. Then, what is the reason to use it instead of basic 4 bit?
This was still under active development the calibration mix has been improved and made more diverse. New benchmarks were also added that show clear improvement over uniform 4 bit quants.
How does this benchmark against a Qwen3.6-35B-A3B-oQ6e model. I got similar speed and quality results for both.
oQ (Jundot's oMLX) and OptiQ are the same family of idea: mixed-precision, different bit-widths per layer instead of uniform. The difference is the signal each uses to place the bits. oQ uses an importance matrix (imatrix); OptiQ uses per-layer KL-divergence sensitivity. The writeup on that is here: https://mlx-optiq.com/blog/not-all-layers-are-equal
Both allocate bits by importance rather than uniformly, so similar quality between the two makes sense. One note on the numbers: the OptiQ Capability Score is just the mean of six tasks, and it's a different suite than the 83.88 on the oQ card, so those two aren't directly comparable.
Where OptiQ tends to pay off is less the raw 4-bit quality and more what ships around the quant: a bundled MTP head for ~1.4x speculative decode, per-layer mixed-precision KV cache so long context doesn't blow up memory, and it drops into optiq serve (OpenAI + Anthropic-compatible) with sensitivity-aware LoRA fine-tuning on the same checkpoint.
May i suggest to review https://github.com/defai-digital/axquant
I think it would be helpful to promote local llm with mlx