Views
No views yet
Status: experimental. Quantization quality is good (see below). As of turboquant-mlx-full 0.7.1 the runtime has a fused batched gather-GEMM for diffusion's 256-token canvas forwards (~4.6 tok/s, up from 1.6 at 0.7.0); the remaining gap to the mlx-community 4-bit (~35 tok/s) is partly per-op (attention kernel) and partly inherent — the 3-bit model needs more denoising iterations to converge than the 4-bit one. Use the 4-bit build if you want the fastest local DiffusionGemma; use this one for the smallest footprint or to follow TurboQuant's diffusion-LLM support.
diffusion_gemma)experts.gate_up_proj / experts.down_proj, ~90% of params) → 3-bitq/k/v/o_proj) → 3-bitturboquant-mlx-full >= 0.15.1):turboquant-plan --model manjunathshiva/diffusiongemma-26B-A4B-it-tq3-g32Model
weights (exact) 14.9 GB
KV cache 65.0 KB/token (hybrid: 5/30 full-attention, 25 sliding (window 1024))
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/diffusiongemma-26B-A4B-it-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.| this repo (tq3-g32) | mlx-community 4-bit | BF16 | |
|---|---|---|---|
| Size on disk | 13.8 GB | 15.0 GB | ~48 GB |
| Peak memory (text gen) | ~18 GB | ~19 GB | — |
| Generation speed | ~4.6 tok/s (turboquant ≥0.7.1) | ~35 tok/s | — |
| Probe | Result |
|---|---|
| Multi-step math | ✅ 17×23 = 391; 144/12 + 7×3 = 33 with clean PEMDAS steps |
| Code generation | ✅ Correct iterative Fibonacci (minor wording artifact in a comment) |
| In-context recall | ✅ Access code 7392 + server HELIOS recalled exactly |
| Free-form prose | ✅ Coherent; occasional dropped/doubled word — same artifact class as the 4-bit build |
1# macOS with Apple Silicon (M1/M2/M3/M4/M5)
2pip install "turboquant-mlx-full[vlm]>=0.7.1" # pulls mlx-vlm >= 0.6.3generate_vlm entry point (shipped in 0.7.0). The two .py
scripts bundled in this repo are a standalone alternative, but they predate
the 0.7.1 gather-GEMM kernel and run slower — prefer the package entry point.1python -m turboquant_mlx.generate_vlm \
2 --model manjunathshiva/diffusiongemma-26B-A4B-it-tq3-g32 \
3 --prompt "Write a short paragraph about the ocean." \
4 --max-tokens 256 --temp 0.0--image flag is available for
multimodal prompts (the vision tower is kept at bf16).1python -m turboquant_mlx.convert_vlm \
2 --hf-path google/diffusiongemma-26B-A4B-it \
3 --mlx-path ./diffusiongemma-26B-A4B-it-tq3-g32 \
4 --bits 3 -g 321@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}