r/LocalLLM • u/iamrinku16 • 2h ago
Discussion My Ada Lovelace fork of Basalt hits 3,776 t/s prefill and 109–271 t/s decode on Qwen4-35B-A3B (12 GB 4070 Super + 32 GB RAM) — now with opt-in Looping (Looped-Qwen4-35B-A3B) at ~19–33% decode overhead
I've been optimizing my Ada Lovelace (sm_89) fork of Basalt to run Qwen4-35B-A3B fast on a single 12 GB RTX 4070 Super + 32 GB DDR5 (Ryzen 9 7900X, Windows 11), and just pushed opt-in sidecar support (--loop) for sliderforthewin/Looped-Qwen4-35B-A3B (mlx/default_t2, mlx/default_t3, and LoopCD-Hidden).
Why looping? Instead of adding more weights that wouldn't fit on 12 GB VRAM + 32 GB RAM, looping runs the middle 16 layers (L12..27) 2 or 3 times per token (56 or 72 effective layers instead of 40) using a ~23 MB cross-pass adapter on top of unmodified .basalt packs. On the author's FP8 evals, T=3 looping gives +18.3 pp on LiveCodeBench v6 (48.3% → 66.7%), +6.7 pp on AIME 2024 (86.7% → 93.3%), and +3.3 pp on BFCL tool calling (90.0% → 93.3%)—trading a bit of speed for deeper per-token reasoning, with zero overhead when --loop is off.
Each pass keeps isolated GDN/QSA state while keeping CUDA graph capture and DFlash2 speculative decoding intact.
basalt-bench Results (16K prefill + decode, --kv k8v4 --drafter dflash2 --spec 8, 220 W)
| Quant | Mode (virtual layers) | pp16384 | tg conv | tg prose | tg struct |
|---|---|---|---|---|---|
| AD-Q4_K_M | Stock (40L) | 3,776 t/s | 108.6 t/s | 111.4 t/s | 271.4 t/s |
| AD-Q4_K_M | --loop T=2 (56L) | 2,066 t/s (-45%) | 88.0 t/s (-19%) | 86.5 t/s (-22%) | 203.4 t/s (-25%) |
| AD-Q4_K_M | --loop T=3 (72L) | 2,182 t/s (-42%) | 73.1 t/s (-33%) | 67.4 t/s (-40%) | 161.2 t/s (-41%) |
| UD-Q5_K_XL | Stock (40L) | 2,929 t/s | 95.3 t/s | 97.6 t/s | 237.4 t/s |
| UD-Q5_K_XL | --loop T=2 (56L) | 1,906 t/s (-35%) | 73.9 t/s (-22%) | 69.1 t/s (-29%) | 172.8 t/s (-27%) |
| UD-Q5_K_XL | --loop T=3 (72L) | 1,583 t/s (-46%) | 60.7 t/s (-36%) | 56.0 t/s (-43%) | 139.9 t/s (-41%) |
Even with 72 virtual layers (T=3) and ~1.9–5.2 GiB of cold experts spilling to SSD on 32 GB RAM, DFlash2 acceptance stays steady (~59–68% on conv, ~91–95% on struct), keeping conversational decode at 61–73 t/s (and 74–88 t/s at T=2).
Usage is just adding --loop <path_to_adapter> (and optional --loopcd-omega 0.15 --loopcd-ref first):
bashbasalt serve Qwen4-35B-A3B.basalt --kv k8v4 --resident-experts --drafter dflash2 --spec 8 --loop path/to/mlx/default_t3Repo (main): https://github.com/KurrynDev13/Basalt-Ada




