Skip to content

llama-modchip v3.2.5 — AVX2/AVX-VNNI Batched 1x2/1x3/1x4/1x8 Dot Kernels (1.42x-4.23x), Q1_0 UBSan Fix & Portable GLIBC<=2.30 Binaries

Choose a tag to compare

@synchopate synchopate released this 03 Dec 15:08
· 2 commits to main since this release

v3.2.5 — AVX2 & AVX-VNNI Batched 1×2/1×3/1×4/1×8 Speculative & Prefill Dot Kernels (Q1_0, Q2_0, Q8_0, MXFP4, IQ4_NL, FRACTAL_64, VQ3_64), Q1_0 UBSan Fix & Portable GLIBC<=2.30 Binaries

Release Date: December 2026
Highlights:

  1. True AVX2 / AVX-VNNI Batched 1×2, 1×3, 1×4, 1×8 Quantized Dot Kernels (arch/x86/quants.c, ggml-cpu/quants.c):
    • Previously, ggml_get_vec_dot_multi dispatched 1×2/1×3/1×4/1×8 batched matrix-vector kernels during RouteCrack 2.0 / draft-mtp speculative verification and prompt prefill, but on non-AVX-512 AVX2 CPUs (Zen 1–3, Skylake, Alder/Raptor/Meteor Lake) all 7 quantized formats (Q1_0, Q2_0, Q8_0, MXFP4, IQ4_NL, FRACTAL_64, VQ3_64) silently fell back to a serial for (int k = 0; k < K; ++k) loop that re-read and re-unpacked weights 4×–8× per step.
    • Adds zero-spill single-load AVX2 (and optional -mavxvnni vpdpbusd) 1×K batched kernels for all 7 formats (splitting 1×8 into two register-clean 1×4 passes with zero aligned SIMD loads for strict Windows PE/COFF safety), leaving all AVX-512 paths 100% untouched.
    • Verified AVX2 Speedups & Numerical Accuracy (-mavx2 -mfma -mf16c -mno-avx512f, M=2048 × K=4096, 5,712/5,712 stress checks + 3,059/3,059 MUL_MAT + 1,420/1,420 MUL_MAT_ID PASS):
      • VQ3_64: 4.23× (N=4) / 3.83× (N=8)
      • FRACTAL_64: 1.93× (N=4) / 1.85× (N=8)
      • Q8_0: 1.87× (N=4) / 1.24× (N=8)
      • IQ4_NL: 1.64× (N=4) / 1.39× (N=8)
      • MXFP4: 1.54× (N=4) / 1.35× (N=8)
      • Q2_0: 1.42× (N=4) / 1.45× (N=8)
      • Q1_0: 1.17× (N=4) / 1.19× (N=8)
      • (L3-resident microbenchmark; DRAM-streaming 32 GB / 64 GB MoE workloads benefit even further from 4× fewer weight reads during speculative verify & prefill.)
  2. Q1_0 AVX2 Unaligned Pointer UBSan Fix (arch/x86/quants.c):
    • Replaces misaligned (const uint32_t *) x[ib].qs casts in ggml_vec_dot_q1_0_q8_0 (block_q1_0 is 18 bytes -> 2-byte aligned) with memcpy, achieving 0 errors under -fsanitize=address,undefined -fno-sanitize-recover=all.
    • Zero GGUF checkpoint changes — all v3.1.1/v3.2.4 Fleet GGUF SHA-256s remain 100% identical.
  3. 12 Rebuilt Static-libgomp Portable GLIBC_2.30 Linux x86_64 Binaries, Tarball & Patch (v3.2.5 SHA256SUMS):
    • Built on ubuntu:20.04 (gcc-11/g++-11 + GNU gas 2.38, GLIBC <= 2.30, static libgomp.a + libstdc++.a + libgcc.a, 0 %zmm in -avx2, 0 vdpbf16ps in -avx512, 0 dynamic libgomp/libstdc++/libssl dependencies; runtime AVX-VNNI Inkling-2 FMV active inside -avx2):
      • 9c1e8815f71dc673bece491fa836191bb02d6f3420b372dceed995b975145760 llama-modchip-v3.2.patch
      • 0bdd029b230539c49810ef330e44d8d9e3d294f0e7dad8ddff7122d7ca0dba70 llama-server-modchip-linux-x86_64-avx512
      • b3e020b79c90b6e74a0cbbf5139328b0f3c6846f4df9dc87b2b02b0d254e04a0 llama-server-modchip-linux-x86_64-avx2 (and llama-server-modchip-linux-x86_64)
      • 9b8882d9a2d06eb63c677f3134f1d867dda40868cf2ac9632cff5491f2b4d5b9 llama-cli-modchip-linux-x86_64-avx512
      • 6f2cefe4ebde0a17f48f4806f78864199234b16bce058f0d940a8de8936562ed llama-cli-modchip-linux-x86_64-avx2 (and llama-cli-modchip-linux-x86_64)
      • cc12a5c421524d3677f4d013efa1ca97dc77568889c951fd716e295554583b34 llama-bench-modchip-linux-x86_64-avx512
      • b3f49ea43ce3160045d16a39f5c911f904deeae1bd55e5c5fac86f17746865fe llama-bench-modchip-linux-x86_64-avx2
      • 426ae9e60088c046a3176fb5adf1d7d2255c34caa56d101511ff4a341091328c llama-perplexity-modchip-linux-x86_64-avx512
      • 23fe1848171a3f987aebb724181ac60e30b20edcb3326f3569f801238f48b5d0 llama-perplexity-modchip-linux-x86_64-avx2
      • e252d4b064ed55d9f0c216b36942955461bd7e183365fa8a4ab37c98a6d553da llama-quantize-modchip-linux-x86_64-avx512
      • d24d290280a2bfcae02ae8823f90b3d4c941ce3d85c4e3362e5f7e08f7169704 llama-quantize-modchip-linux-x86_64-avx2
      • 75d7517bab912b4af4554507fe647878c581cf0805101c154c637654c8c6eba7 llama-modchip-v3.2.5-linux-x86_64.tar.gz