Repository navigation
Rebase onto upstream ggml-org/llama.cpp (April 2026) - #80
Conversation
Metal Build + Test Results (M5 Max, April 15 2026)Model: Qwen2.5-7B-Instruct-Q3_K_M (3.54 GiB) PPL (wikitext-2, 3 chunks × 16K)
Throughput (llama-bench, 3 reps)
Memory
Notes
|
Testing help needed 🙏This rebases onto 148 upstream commits — conflicts resolved but needs validation on non-Metal backends before merge. CUDA — @signalnine could you test a build + turbo KV + TQ4_1S weight quant on your setup? The enum IDs shifted (turbo types now 42-46 instead of 41-45) so want to make sure nothing broke in the CUDA kernels. Vulkan — @Titaniumtown the Vulkan conflicts were the heaviest (pipeline setup, shader gen, copy_to_quant, types.glsl, dequant_funcs_cm2). Upstream added RTE variants + NVFP4 + Q1_0 — merged alongside turbo3. Would appreciate a shader compilation + basic inference test. HIP/ROCm — @andyluo7 CDNA4 commit landed clean but the variadic shfl macros in hip.h got merged with upstream's NCCL_CHECK addition. Worth a sanity check if you have access. Weight quant (TQ3_1S/TQ4_1S) — @iamwavecut Python gguf constants updated to match new enum numbering (TQ3_1S=45, TQ4_1S=46). If you can verify a round-trip quantize+dequant that'd be 👌 Metal is ✅ — results in previous comment. |
Weight Quant (TQ3_1S / TQ4_1S) — Metal, M5 Max ✅Model: Qwen2.5-1.5B-Instruct (fresh f16 → TQ quantize with new enum IDs) QuantizeBoth round-tripped clean from f16 source:
InferenceBoth produce coherent output. TQ4_1S quality noticeably better than TQ3_1S at 1.5B scale (expected). PPL (wikitext-2, 3 chunks × 2K)
TQ4_1S PPL delta is reasonable for 5.24 BPW on a 1.5B model. TQ3_1S degrades more but that's expected — 3-bit weight quant on small models hurts. Enum renumbering (TQ3_1S=45, TQ4_1S=46) works correctly. Old GGUF files with previous IDs will NOT load (expected — must re-quantize). |
CUDA Test Results (RTX 5090, sm_120, April 15 2026)Build: Re-quantization (new enum IDs)Both round-tripped clean from f16 source (Qwen2.5-7B-Instruct):
Old GGUFs (pre-renumbering) fail to load with Throughput (llama-bench, Qwen2.5-7B TQ4_1S, 3 reps, ngl=99, p=512 n=128)
Findings✅ TQ4_1S weight kernel works — runs cleanly with new enum IDs, no kernel failures, no NaNs in output during smoke runs. Notes
Verdict: CUDA path good to merge modulo the turbo2 V failure (worth confirming whether that's a regression or pre-existing). |
Bisect: turbo2 V failure is pre-existing, not introduced by this PRTested on Root cause (one-line bug, easy fix)
if (params.flash_attn_type == LLAMA_FLASH_ATTN_TYPE_DISABLED &&
(params.type_k == GGML_TYPE_TURBO3_0 || params.type_k == GGML_TYPE_TURBO4_0 ||
params.type_v == GGML_TYPE_TURBO3_0 || params.type_v == GGML_TYPE_TURBO4_0)) {
LLAMA_LOG_WARN("%s: turbo cache types require flash_attn — enabling automatically\n", __func__);
params.flash_attn_type = LLAMA_FLASH_ATTN_TYPE_ENABLED;
}Without auto-enable, the next check ( Suggested fixAdd (params.type_k == GGML_TYPE_TURBO2_0 || params.type_k == GGML_TYPE_TURBO3_0 || params.type_k == GGML_TYPE_TURBO4_0 ||
params.type_v == GGML_TYPE_TURBO2_0 || params.type_v == GGML_TYPE_TURBO3_0 || params.type_v == GGML_TYPE_TURBO4_0)Or, simpler: trigger on any Updated CUDA verdict✅ Merge unblocked from CUDA's perspective. All three turbo V cache types work; the turbo2 auto-enable gap is a pre-existing one-line bug worth fixing in a follow-up but doesn't block this rebase. |
HIP/ROCm (MI300X gfx942) — Build + Inference ✅Platform: 8x AMD Instinct MI300X (gfx942), ROCm 6.3 BuildCompiles clean with No warnings from the variadic shfl macros or NCCL_CHECK merge. QuantizeBoth round-tripped clean from F16:
Sizes match your Metal results within rounding. InferenceAll three produce correct output via MI355X (gfx950) BuildAlso compiles clean with Note
Enum renumbering (TQ3_1S=45, TQ4_1S=46) works correctly on HIP. 👍 |
|
Thank you for the quick turnaround folks! And thanks for the Root cause @signalnine . Will work on this tonight. |
45f8a06 to
1073622
Compare
…OADMAP AtomicBot-ai#77-AtomicBot-ai#87 4 parallele Subagents (Vulkan/AMD, CUDA/MoE, arXiv, Multi-GPU/Batching). 26 neue Ansätze identifiziert, davon 3 Tier 1 Quick Wins (AtomicBot-ai#77-AtomicBot-ai#79), 8 Tier 2 (AtomicBot-ai#80-AtomicBot-ai#87), 10 Tier 3, 5 Tier 4. Verifiziert: PR ggml-org#23056 und ggml-org#16829 bereits im Fork. Top-Empfehlungen: K-Quant MMVQ Fix (AtomicBot-ai#77), GEAR (AtomicBot-ai#80), PEARL (AtomicBot-ai#81), Fiddler (AtomicBot-ai#82), Vulkan Pipeline Cache (AtomicBot-ai#78).
…tomicBot-ai#82 ⏭️ (SPÄTER nach Tiefen-Eval) AtomicBot-ai#77: Benchmark Mars (1B Q4_K_M): MMVQ vs non-MMVQ ±0.5% (Rauschen). tg1: MMVQ 3% schneller. Issue ggml-org#21151 auf Phoenix/RADV nicht reproduzierbar. AtomicBot-ai#80 GEAR: SPÄTER — TurboQuant (3-5x) stärker als GEAR (2.29x). 6-8 Wochen Portierung. Nur Mars (224k) profitiert. AtomicBot-ai#82 Fiddler: SPÄTER — Lizenz unklar, AVX512_BF16 fehlt im Release. Mars (UMA) profitiert nicht. 4-6 Wochen Portierung.
…ode-Review Fixes, AtomicBot-ai#77/AtomicBot-ai#84/AtomicBot-ai#80/AtomicBot-ai#82 Evaluations
Summary
feature/turboquant-kv-cacheonto latestggml-org/llama.cppmaster (148 upstream commits)GGML_TYPE_Q1_0 = 41(turbo2/3/4 now 42-44, TQ3_1S/TQ4_1S 45-46)Conflict resolution details
ggml.h(3x)llama-graph.cppinp->self_v_rot→v_rotllama.hggml-cuda.cu(2x)hip.hmma.cuhconstants.py(3x)ggml-vulkan.cpp(5x)ggml-rpc.h(2x)test-backend-ops.cpp🤖 Generated with Claude Code