Instructions to use Litwein/Qwen3.6-35B-A3B-Claude-4.7-Opus-oQ4-MTP-Vision-MLX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use Litwein/Qwen3.6-35B-A3B-Claude-4.7-Opus-oQ4-MTP-Vision-MLX 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("Litwein/Qwen3.6-35B-A3B-Claude-4.7-Opus-oQ4-MTP-Vision-MLX") config = load_config("Litwein/Qwen3.6-35B-A3B-Claude-4.7-Opus-oQ4-MTP-Vision-MLX") # 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 Litwein/Qwen3.6-35B-A3B-Claude-4.7-Opus-oQ4-MTP-Vision-MLX with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "Litwein/Qwen3.6-35B-A3B-Claude-4.7-Opus-oQ4-MTP-Vision-MLX"
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": "Litwein/Qwen3.6-35B-A3B-Claude-4.7-Opus-oQ4-MTP-Vision-MLX" } ] } } }Run Pi
# Start Pi in your project directory: pi
- OpenClaw new
How to use Litwein/Qwen3.6-35B-A3B-Claude-4.7-Opus-oQ4-MTP-Vision-MLX with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "Litwein/Qwen3.6-35B-A3B-Claude-4.7-Opus-oQ4-MTP-Vision-MLX"
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 "Litwein/Qwen3.6-35B-A3B-Claude-4.7-Opus-oQ4-MTP-Vision-MLX" \ --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"
- Hermes Agent
How to use Litwein/Qwen3.6-35B-A3B-Claude-4.7-Opus-oQ4-MTP-Vision-MLX 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 "Litwein/Qwen3.6-35B-A3B-Claude-4.7-Opus-oQ4-MTP-Vision-MLX"
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 Litwein/Qwen3.6-35B-A3B-Claude-4.7-Opus-oQ4-MTP-Vision-MLX
Run Hermes
hermes
⚠️ Superseded — use v2 instead
👉
Qwen3.6-35B-A3B-Claude-4.7-Opus-oQ4e-DWQ-MC-MTP-Vision-MLXv2 is a two-stage imatrix → DWQ build (reasoning, then math/code) of the same base. It is materially better on code — HumanEval 90.2 % (this v1 line: 84.8 %) · LiveCodeBench 39.9 % (v1: 32 %) · MBPP 75.4 % — at the same size class, same MTP + vision packaging.
This v1 repo is kept for reproducibility only. New users should download v2.
Qwen3.6-35B-A3B-Claude-4.7-Opus-oQ4-MTP-Vision-MLX
A 4-bit MLX quantization (oQ) of
lordx64/Qwen3.6-35B-A3B-Claude-4.7-Opus-Reasoning-Distilled — vision + text, with MTP speculative decoding.
This is a vision-language build of the reasoning-distilled Qwen3.6-35B-A3B, packaged for fast local inference on Apple Silicon with an embedded Multi-Token-Prediction (MTP) head for speculative decoding.
⚠️ These are quantized weights. All capability comes from the base model
lordx64/Qwen3.6-35B-A3B-Claude-4.7-Opus-Reasoning-Distilled— please star/cite it first. This repo's contribution is the quantization + MTP/vision packaging and its fidelity/speed validation.
Model lineage
Qwen/Qwen3.6-35B-A3B (Apache-2.0 base, 35B MoE · 256 experts · ~3B active · 262k ctx)
└─ lordx64/…-Claude-4.7-Opus-Reasoning-Distilled (SFT distillation of Claude Opus 4.7 reasoning)
└─ THIS REPO: oQ 4-bit MLX + MTP + vision
- Architecture: Qwen3.6-35B-A3B — Mixture-of-Experts, 256 experts (8 routed + 1 shared), ~3B active parameters/token, 40 layers (linear + full attention), up to 262,144-token context (the base card recommends ≤64k for best quality).
- Reasoning distillation (by lordx64): SFT on ~7,800
chain-of-thought traces from Claude Opus 4.7 (Anthropic), teaching explicit
<think>…</think>reasoning. Attention-only LoRA (r=16) via Unsloth + TRL. - This repo: 4-bit MLX quantization (oQ) with MTP and the vision tower preserved.
Quantization: oQ4 (oMLX sensitivity-mixed), 4-bit
This is an oQ4 quant produced by oMLX's built-in oq quantizer —
sensitivity-based dynamic mixed precision. Each layer is measured for its impact on the
output and assigned 4, 5, 6 or 8 bits accordingly; the most sensitive projections keep
more bits, the rest go to 4-bit.
| Scheme | affine mixed 4/5/6/8-bit, group size 64 (sensitivity-assigned per layer) |
| Effective size | ~4.9 bits/weight |
| Calibration | oMLX auto_proxy_sensitivity proxy pass over the base weights |
| Tooling | oMLX oq (preserve_mtp=true) |
Mixed precision spends extra bits on sensitive layers; the sibling DWQ4 repos reach the same task quality at a smaller, uniform 4-bit footprint (see Evaluation).
Evaluation
Two kinds of numbers below: quant-fidelity metrics measured on this quant, and capability benchmarks inherited from the bf16 base (a 4-bit quant preserves — does not create — capability; the fidelity metrics show how little was lost).
Quant fidelity (measured on this model, served via oMLX)
| Metric | This model | Notes |
|---|---|---|
| Gradeable math (10 short-answer problems) | 9 / 10¹ | arithmetic, GCD, algebra, calculus, combinatorics — all complete within budget |
Code (4 tasks, exec-checked) |
4 / 4 | RLE, median, balanced-brackets, int→Roman |
| Perplexity | not reported — plain mlx_lm mis-loads oq's 5-bit layers offline; compared via tasks below |
|
| Decode speed (MTP on, M4 Pro 48 GB) | ~50–53 tok/s | multi-token-prediction speculative decoding (measured) |
| MTP draft acceptance | ~40–64 % | content-dependent |
¹ The single miss is a grader formatting artifact on a prime-factorization prompt (7×13 vs 7 and 13), not a reasoning error.
Note on long-form math. This is a reasoning model that routinely emits 8,000+ tokens of
<think>on olympiad problems. Fixed-budget pass/fail on such problems is token-budget-limited, not quantization-limited — every 4-bit and 8-bit level behaves the same. Give it a largemax_tokens(32k) for hard problems.
Inherited base-model benchmarks (bf16, from the base card)
Reported by the base model lordx64/Qwen3.6-35B-A3B-Claude-4.7-Opus-Reasoning-Distilled via lm-evaluation-harness; listed here as a
capability reference for the family, not re-measured on this quant.
| Benchmark | Base (bf16) |
|---|---|
| GSM8K (8-shot CoT) | 84.3 % |
| MMLU-Pro (5-shot) | 74.9 % |
| MMLU-Pro · Math | 83.6 % |
| MMLU-Pro · Physics | 81.0 % |
| MMLU-Pro · Computer Science | 79.0 % |
Sibling repos (same base, pick your trade-off)
| Repo | Quant | Vision | Size | Best for |
|---|---|---|---|---|
…-DWQ4-MTP-Vision-MLX |
DWQ uniform 4-bit | ✓ | ~21 GB | smallest+fastest, multimodal |
…-DWQ4-MTP-MLX |
DWQ uniform 4-bit | – | ~19 GB | smallest+fastest, text only |
…-oQ4-MTP-Vision-MLX |
oq mixed 4–8-bit | ✓ | ~22 GB | mixed-precision, multimodal |
…-oQ4-MTP-MLX |
oq mixed 4–8-bit | – | ~21 GB | mixed-precision, text only |
TL;DR: the DWQ builds are smaller, a touch faster, and match the oQ builds on task quality — distillation lets uniform 4-bit keep up with mixed precision. oQ builds spend extra bits on sensitive layers (a more conservative, classic dynamic quant).
How to run
These are MLX weights (Apple Silicon). The tested serving path is oMLX, which supports this model's native MTP speculative decoding and vision out of the box.
This repo includes the vision tower (vision_tower.*, bf16) — it accepts images/video as well as text.
1. Place the folder in your oMLX models directory:
# after downloading this repo:
mv Qwen3.6-35B-A3B-Claude-4.7-Opus-oQ4-MTP-Vision-MLX ~/.omlx/models/
2. Enable MTP for this model (one-time), then call the OpenAI-compatible API:
curl -X PUT http://127.0.0.1:8003/admin/api/models/qwen3.6-35b-a3b-claude-4.7-opus-oq4-mtp-vision-mlx/settings \
-H "Authorization: Bearer sk-local" -H "Content-Type: application/json" \
-d '{"mtp_enabled": true}'
curl -X POST http://127.0.0.1:8003/v1/chat/completions \
-H "Authorization: Bearer sk-local" -H "Content-Type: application/json" \
-d '{"model": "qwen3.6-35b-a3b-claude-4.7-opus-oq4-mtp-vision-mlx",
"messages": [{"role": "user", "content": "Prove there are infinitely many primes."}],
"max_tokens": 8000, "temperature": 0.6}'
The oq mixed-precision (4–8-bit) layout is built for oMLX; stock mlx-lm does not reliably reconstruct the 5-bit layers, so run this build through oMLX.
MTP speculative decoding needs an MTP-aware runtime — oMLX (tested), or mlx-lm with PR #990.
Recommended sampling
temperature 0.6, top_p 0.95, top_k 20. For hard reasoning set max_tokens ≥ 32000 — the
model thinks in explicit <think>…</think> blocks and can be long.
Intended use & limitations
- Built for hard reasoning: competition math, STEM, code walk-throughs, multi-step logic.
It thinks in long
<think>blocks — budget tokens accordingly. - Reasoning ≠ knowledge. Quantization (and the base distillation) transfer how to reason, not new facts.
- Quantization loss: 4-bit is lossy vs bf16. The fidelity metrics above quantify it (small); for maximum quality use the base bf16 or an 8-bit quant.
- Distillation provenance: the base's training traces were generated with Anthropic's Claude Opus 4.7. Downstream users should confirm compliance with Anthropic's usage policy.
Datasets
- Base distillation (training):
lordx64/reasoning-distill-opus-4-7-max-sft— ~7,800 Claude Opus 4.7 reasoning conversations. - Quant calibration (oQ): oMLX sensitivity proxy over the base weights (no external dataset).
Acknowledgements
- lordx64 — the reasoning-distilled base model this repo quantizes. All capability is theirs.
- Qwen team — Qwen3.6-35B-A3B, released under Apache-2.0.
- Anthropic — Claude Opus 4.7, the reasoning teacher for the base distillation.
- Apple MLX —
mlx/mlx-vlm— the MLX runtime that oMLX'soqquantizer is built on. - oMLX — the
oqquantizer, MTP/vision serving runtime, and OpenAI-compatible API. - Unsloth & EleutherAI lm-evaluation-harness — used by the base model (training / eval).
License
Apache-2.0, inherited from the base model and Qwen3.6-35B-A3B.
Citation
@misc{qwen36_a3b_2026, title={Qwen3.6-35B-A3B}, author={Qwen Team}, year={2026},
howpublished={\url{https://huggingface.co/Qwen/Qwen3.6-35B-A3B}} }
@misc{lordx64_qwen36_distill_2026,
title={Qwen3.6-35B-A3B distilled from Claude Opus 4.7 reasoning}, author={lordx64}, year={2026},
howpublished={\url{https://huggingface.co/lordx64/Qwen3.6-35B-A3B-Claude-4.7-Opus-Reasoning-Distilled}} }
- Downloads last month
- 616
4-bit
Model tree for Litwein/Qwen3.6-35B-A3B-Claude-4.7-Opus-oQ4-MTP-Vision-MLX
Base model
Qwen/Qwen3.6-35B-A3B
# 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("Litwein/Qwen3.6-35B-A3B-Claude-4.7-Opus-oQ4-MTP-Vision-MLX") config = load_config("Litwein/Qwen3.6-35B-A3B-Claude-4.7-Opus-oQ4-MTP-Vision-MLX") # 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)