Views
No views yet
qwen3_5_moe)turboquant-mlx-full >= 0.15.1):turboquant-plan --model manjunathshiva/Qwen3.6-35B-A3B-tq3-g32Model
weights (exact) 16.9 GB
experts 15.0 GB (streamable)
resident 2.0 GB
KV cache 20.0 KB/token (hybrid: 10/40 full-attention)
Verdict: <resident | needs a wired-limit raise | streaming>
Recommended: <the exact flags for your Mac>--wired-gb / --ram-gb are for:1turboquant-plan --model manjunathshiva/Qwen3.6-35B-A3B-tq3-g32 \
2 --wired-gb 10.5 --ram-gb 16 --context 8192turboquant-doctor runs the same projection plus a readiness check; both take --json. The projection is calibrated against real measurements on a 16 GB Mac mini rather than estimated from theory — on the 9.4 GB ternary 35B it predicts a 10.44 GB peak where that machine measures 10.42.| Configuration | Size | Decode speed | Peak memory |
|---|---|---|---|
| BF16 (original, text-only) | ~72 GB | — | doesn't fit 64 GB |
| TurboQuant 3-bit g32 | ~16 GB | ~60 tok/s | ~18 GB |
Note: this is a thinking-mode model — it emits a reasoning trace before the final answer, so use a generous--max-tokens(e.g. 512+) for tasks that need a concluding answer.
turboquant-serve endpoint (thinking off, temp 0.7): given a repo with a failing pytest suite, this build ran the test command it was given, read the source, made the correct minimal fix, and re-ran the tests to green — end-to-end in 33 seconds. The 1.58-bit sibling failed the identical task 4/4 times (details on its card) — multi-step tool use survives 3-bit, not 1.58-bit.turboquant-mlx-full[serve] >= 0.12.3):1turboquant-serve --model manjunathshiva/Qwen3.6-35B-A3B-tq3-g32 \
2 --kv-bits 8 --temp 0.7 --top-p 0.8 --top-k 20 \
3 --chat-template-args '{"enable_thinking": false}'temperature, and the server's fallback is greedy decoding — fine for chat, but worth avoiding in long tool loops.sysctl bump). On a 16 GB machine it runs via expert streaming (below) — for agent use there, prefer native routing (--max-active-experts 0): the K-reduction shortcut is validated byte-identical for chat but not for long tool-calling loops, and expect patience on the first turn (agent harnesses send large system prompts, which stream-prefill slowly).default_model — the server serves the CLI-loaded model under that id.--max-active-experts 4, default in 0.10.0+): caps router top-8 → top-4 on every MoE block. The top-4 experts dominate routing so heavily that this produced byte-identical output to native top-8 across our 6-test stress harness (code, math, needle-in-haystack, JSON format, long-essay, repetition) — while halving the experts streamed from disk per token. Raise to 6 for extra margin, or 0 for native routing.F_NOCACHE on so the OS page cache doesn't thrash the live working set. No flag needed; override with --use-page-cache / --no-page-cache.| Cache budget | top-k | Expert hit-rate | Disk read (256 tok) | Decode (end-to-end) | Peak RSS |
|---|---|---|---|---|---|
--cache-budget-gb 6 | 4 | 86.8% | 8.2 GB | 9.4 tok/s | 7.6 GB |
--cache-budget-gb 8 (recommended) | 4 | 88.4% | 7.2 GB | 10.0 tok/s | 8.8 GB |
--cache-budget-gb 12 | 6 | 90.5% | 8.8 GB | 8.7 tok/s | 10.3 GB |
--cache-budget-gb 8 --max-active-experts 4 is the sweet spot. Raising to top-6 reads ~20% more for no measurable quality gain. The disk is the limiter — ~10 tok/s here off a spinning HDD; moving the model to an SSD removes the per-expert seek cost.--cache-budget-gb 8 --max-active-experts 4 config, a ~2.6K-token generation reached ~13 tok/s end-to-end at a 94% hit-rate (~14.5 MB read/token, vs ~28 MB cold) — so a sustained chat or coding session runs noticeably faster than the cold-start number, with peak RSS still ~9.5 GB. Give thinking-mode tasks a generous --max-tokens (4096+) so the reasoning trace completes and the cache gets time to warm.1pip install "turboquant-mlx-full>=0.10.0"
2
3python -m turboquant_mlx.stream.stream_generate \
4 --model manjunathshiva/Qwen3.6-35B-A3B-tq3-g32 \
5 --prompt "Write a Python function that merges two sorted lists." \
6 --max-tokens 512 \
7 --cache-budget-gb 8 \
8 --max-active-experts 4You can also serve the streamed model to an OpenAI-compatible endpoint (Claude Code, Aider, etc.) withturboquant-serve(add--cache-budget-gb 8 --max-active-experts 4, requires 0.11.0+).
1# macOS with Apple Silicon (M1/M2/M3/M4)
2pip install turboquant-mlx-full mlx-lm1python -m turboquant_mlx.generate \
2 --model manjunathshiva/Qwen3.6-35B-A3B-tq3-g32 \
3 --prompt "Write a Python function that returns the nth Fibonacci number." \
4 --max-tokens 512 \
5 --temp 0.71python -m turboquant_mlx.generate \
2 --model manjunathshiva/Qwen3.6-35B-A3B-tq3-g32 \
3 --prompt "Your long prompt here..." \
4 --max-tokens 512 \
5 --kv-k-bits 8 --kv-v-bits 3 --kv-min-tokens 1281@article{zandieh2025turboquant,
2 title={TurboQuant: Online Vector Quantization with Near-optimal Distortion Rate},
3 author={Zandieh, Amir and Daliri, Majid and Hadian, Majid and Mirrokni, Vahab},
4 year={2025},
5 eprint={2504.19874},
6 archivePrefix={arXiv},
7 primaryClass={cs.LG},
8 url={https://arxiv.org/abs/2504.19874}
9}