r/llamacpp • u/CostaTattooz • 19h ago
r/llamacpp • u/noahdowah • 22h ago
Hey r/StrixHalo — Qwen4-35B-A3B PaoAI STRIX (Q4..Q8 + shared PLE + vision) + Engine 2.1.0 is live with 1M context unlocked
r/llamacpp • u/Wally-Gator-1 • 16h ago
Qwen 4 35B-A3B - Dual RTX 3060 (24GB) - 70 t/s at 200K+ Context (Procedure & Parameters)
I hope my setup note will help others configure their Qwen 4 35B-A3B on older consumer grade systems (Ryzen 5 + DDR4 + RTX3060).
r/llamacpp • u/Distinct-Pie2389 • 4h ago
0.02690, 93.33% (UD-Q6_K_XL); 0.06587, 89.72% (UD-IQ4_XS), against our own BF16 base (Qwen4-35B-A3B)
I measured yesterday 12/04 and today 12/05
BF16 base built with llama-perplexity --kl-divergence-base from Unsloth's BF16 GGUF (wikitext-2, 100 chunks of 512, base PPL 7.5364, sha256 ca42cdb0a114c9192e6f854279725ed74be09ea43d91fbdcf082574b2d70f641)
I haven’t measured UD-Q8_K_XL. I saw earlier someone had worse results with Q8 XL vs Q8_0
Any experience from Q8_K_XL vs Q8_0 before I start this next run?
Reference: unsloth docs
Everything is in the repo as well - Halocline
r/llamacpp • u/bhones • 11h ago
14 drop-in ROCm/HIP patches for llama.cpp on AMD RDNA 2 (RX 6900 XT / gfx1030): Wave32 FlashAttention, v_dot8_u32_u4, Qwen3.5 fusions, and benchmarks vs. Mesa RADV
My main local GPU is a consumer 16 GiB Radeon RX 6900 XT (gfx1030, Navi 21). Until now I kept most AMD routes on Mesa RADV (Vulkan0) because stock upstream llama.cpp (ee46715 on ROCm 7.2) lost to RADV on 18 out of 18 single-token decode (tg128) tests by -6% to -14%.
When I audited libggml-hip.so and ran rocprofv3 traces, five big bottlenecks popped out:
- Upstream routed RDNA 2 MMVQ onto a single-warp fallback (
nwarps = 1), capping Wave32 residency at16/32waves per CU. 3,470of7,632compiled HSACO kernels (45.5%) were spilling to private scratch (273in FlashAttention and1,299in MMQ/MMQ-few alone).- Small-batch quantized-KV FlashAttention (
B = 1..8) was converting KV tiles through FP16 staging buffers, thrashing Infinity Cache. nsm = 40(WGPs) instead of80physical CUs left40–80%of CUs idle aroundpp=64.- Unfused
Qwen3.5hybridGated-DeltaNet/SSM_CONVops and standalonequantize_q8_1launches burned31%of wall time in AQL dispatch gaps.
What's in the Patch Stack (14 atomic MIT patches, ggml/src/ggml-cuda/ only)
Everything is strictly gated to RDNA 2 (gfx1030, zero core/model/server edits, non-RDNA2 HIP/CUDA/Vulkan/CPU untouched):
- Multi-warp Wave32 MMVQ & DPP: Decoupled
MMVQ_PARAMETERS_RDNA2(2–4 warps) + native Wave32v_permlanex16_b32/v_pk_max_f16. - Zero-scratch Wave32
flash_attn_ext_rdna2: Eliminated all273/273FA spills; stages rawQ8_0/Q4_0/Q4_1/F16KV directly in LDS (0 BFP16 staging) and uses losslessv_dot8_u32_u4forQ4_0/Q4_1KV (-32.2%FA active time vsq8_0atd=16384). - Zero-spill MMQ + bit-parallel IQ + 80-CU guard: Eliminated all
1,299MMQ/MMQ-few spills, addedv_xad_u32+v_perm_b32IQ2/IQ3sign unpackers (helpful for fitting27B+16Kctx inside16 GiB), and keptJ=32whenJ=64would under-fill80CUs. Qwen3.5GDN/SSM fusions + inlineQ8_1epilogues: Thinmmvfrouting (pp=16..64+10.1%..+34.7%), fusedGDNgate/beta +SSM_CONV -> SiLU -> Q/K L2 norm, and inlineQ8_1quantization insideRMSNorm/GLU(-75.2%decodequantize_q8_1dispatches,-34.6%AQL gaps,-309to-752 MiBpeak server VRAM).
Selected Benchmarks (RX 6900 XT, ROCm 7.2, llama-bench -r 3 -fa 1)
Format: Stock HIP -> Patched HIP (vs Stock HIP | vs Mesa RADV)
| Workload | KV | 9B UD-Q4_K_XL | 9B UD-IQ3_XXS | 27B UD-IQ3_XXS |
|---|---|---|---|---|
tg=128 (d=0) | q8_0 | 65.92 -> 70.25 (+6.6% | 0.962x) | 83.91 -> 94.11 (+12.2% | 0.982x) | 30.69 -> 32.81 (+6.9% | 0.982x) |
tg=128 (d=16384) | q4_0 | 62.99 -> 68.05 (+8.0% | 1.006x) | 80.51 -> 88.77 (+10.2% | 1.019x) | 29.16 -> 30.81 (+5.7% | 0.993x) |
pp=4 (d=8192) | q8_0 | 192.10 -> 229.13 (+19.3% | 1.684x) | 220.06 -> 281.68 (+28.0% | 2.147x) | 78.75 -> 104.92 (+33.2% | 1.596x) |
pp=8 (d=8192) | q8_0 | 283.26 -> 347.39 (+22.6% | 1.824x) | 310.91 -> 459.77 (+47.9% | 2.227x) | 105.65 -> 161.14 (+52.5% | 1.795x) |
pp=8 (d=16384) | q4_0 | 270.75 -> 340.85 (+25.9% | 1.511x) | 305.74 -> 442.56 (+44.8% | 2.177x) | 101.62 -> 152.38 (+49.9% | 1.788x) |
pp=512 (d=0) | q8_0 | 1634.35 -> 1656.87 (+1.4% | 1.031x) | 1951.65 -> 2004.62 (+2.7% | 1.401x) | 585.44 -> 604.19 (+3.2% | 1.427x) |
On single-request llama-server (draft-mtp, cache_prompt: false):
27B UD-IQ3_XXS(n=3,short_temp0770/256):43.71 -> 56.92 tg tok/s(1.302xvs stock HIP,1.276xvs RADV; wall6.03s -> 4.67s,+29.0%).27B UD-IQ3_XXS(n=3,ctx4k_greedy6,775/192):44.25 -> 55.56 tg tok/s(1.256xvs stock HIP; wall16.92s -> 15.62svs RADV21.57s,1.38xfaster than RADV).9B UD-IQ3_XXS(n=2,ctx4k_greedy6,775/192):105.70 -> 123.66 tg tok/s(1.170xvs stock HIP; wall5.78s -> 5.36svs RADV7.17s).
Honest Caveats & What Didn't Work
- Failed ablations kept out: Non-temporal
MALLweight loads (-10%to-22%decode),Gate+Upfusion aboveB = 1(-30%to-37%pp=8), andv_dot8inside MMVQ/MMQ (-13%to-17.5%pp=16..32becausev_dot8shares the same 1 op/cycle SIMD32 rate asv_dot4on RDNA 2 and only wins whenO(1)prologue packing amortizes over long KV tiles). - Greedy divergence (
DIFF!):test-backend-ops(7/7) passed 100% and 6-chunk WikiText-2 KLD hitMean KLD = 0.000000, but multi-warp reduction reordering still nudges borderline greedy tokens and can swing draft acceptance on individual single-shot runs (one9B IQ3_XXSshort greedy row dipped to0.984x tgon a-10.6pp acceptance swing). - Pure
q8_0decode vs RADV: Patched HIP ties or beats RADV on9B q4_0decode (1.000x–1.019x), while pureq8_0tg128still sits1–4%behind RADV (0.953x–0.989x) — traded against HIP's1.34x–2.28xverify and1.03x–1.44xprefill lead. - Hardware tested: Physically validated on an RX 6900 XT (
gfx1030).gfx1031(6700 XT) /gfx1032(6600 XT) share the same Wave32 /v_dot4/v_dot8ISA, so feedback from anyone testing on those cards would be awesome. - MIT Repo (14 patches, spill auditor, fail-closed A/B harness,
AGENT_ADOPT_PROMPT.md): https://github.com/s1mply-parad0x1cal/llama-cpp-navi21-optimizations - Full write-up (ad-free, with ablations and comparison to
llama-navi21-furnace/llama-cpp-rdna-boosts): https://nocthoughts.com/2026/12/04/navi21-gfx1030-rocm-hip-optimizations-for-llama-cpp.html
r/llamacpp • u/TheLocalLab • 20h ago
Ternary Bonsai 2.5 27B on 8GB VRAM - Local AI With Vision (llama.cpp Windows Setup)
Ternary Bonsai 2.5 27B is a new open model from PrismML: a full 27-billion-parameter model where every weight is just minus one, zero or plus one. That shrinks the file from 53.8 GB to about 6 GB, so it fits on an 8 GB gaming card, and it can read pictures too. On my RTX 5060 Laptop GPU (8 GB) it answered at about 26 tokens a second.
Model (GGUF files, PrismML): https://huggingface.co/prism-ml/Ternary-Bonsai-2.5-27B-GGUF/tree/main