Vibe-coded MLX kernels push Inkling-2-Mini to 30+ tok/s and 512k context on M2 Max
fnordonk · reddit · 2026-11-25
Reddit user fnordonk used a Gemini subscription to vibe-code experimental MLX Metal kernels and a mixed-precision quant of Inkling-2-Mini targeting Mac M1/M2, benchmarked on a 64 GB M2 Max:
- Quant strategy: M1/M2 lacks hardware microscaling decode, so software unpacking NVFP4/MXFP8 costs 30–40% speed; affine (gs=64) kernels instead. Uniform 4-bit traps the model in thinking loops on long coding tasks (0/12 on a 64k DAG test), and crushing the last 4 layers to 4-bit drops accuracy (10/12). Mirroring the training split—4-bit affine for layers 0–19 experts, 8-bit for layers 20–23 experts + attention/embed/lmhead, FP32 for AttnRes/routers—recovers 12/12 in 18 GB.
- Kernels: FP16 activation path plus fused Metal kernels (shortconv, qkvpost, Split-K relative attention) delivers large gains over the mlx-lm baseline.
- MTP/KV: adaptive DSpark MTP with a SpeculativeRotatingKVCache cuts 512k-context MTP KV memory 6x, backing off to d=0 on high-entropy prose.
- Results: 549 tok/s prefill / 33.2 tok/s decode at 512 tok context; 501/26.1 tok/s at 32k (21.2 GB peak); 37–48 tok/s coding/tool-calling at 75–89% acceptance; 512k NIAH in 38 GB.
- Code and 5.52 bpw weights are on GitHub and Hugging Face, explicitly no production guarantees.
More from Infra
- Phala open-sources 232MB LoRA that cuts DeepSeek V4.1 Flash refusals from 99.3% to 8.5% — bgmshana · 2026-11-25
- OpenClaw turns 1: the headless Mac mini AI agents guide gets a full update — heyneighbor · 2026-11-25
- Particle-1 lands in agentrun: one API key runs your agents without OpenRouter — garrytan · 2026-11-25
- 10 open-source sandbox repos for running AI agent code safely — victor_explore · 2026-11-25
- Dev builds anti-detect browser + captcha engine stack to let AI agents surf the web — ZeroToOneish · 2026-11-25
- Jensen's "mundane compute" claim dissected: a 10T model needs 100K B200s, 15% fail early — teortaxesTex · 2026-11-25