Merge ParoQuant: PRs #65, #66 and #67 (malic), with fixes

Rotated Qwen3.8-27B checkpoints: ParoQuant MXFP4, int5 bit-plane and z-lab's int4 import (the givens
transform with parts, per-row scales, zero points), the w5a16/w4a16_asym decode GEMMs, the
w4a8i8/w5a8i8 prefill band, the givens_rotate kernel, and the dense per-group rotation
(givens_dense_quant: one 128x128 f16 matrix a part and group on the matrix cores) for the quantising
rotation in prefill. gemm_nt_q gains part bounds (pb1/pb2), an op-schema change an out-of-tree
kernel library has to follow.

Fixes on top: the dense matrices are a container table ("t.dense") that rad-convert composes in f64
from the pairs and angles, and the loader only moves its bits. A container converted before this is
refused at load, naming the re-convert (--reuse copies every unchanged weight). A gemm_nt_q row that
does not read part bounds refuses them instead of ignoring them. libavx implements givens_rotate and
givens_dense_quant.
This commit is contained in:
Deadcode committed 2026-10-12 20:46:37 +02:00
commit f6a9467cb5
40 files changed
+4206 -143

No files matched your search

+3
View File
@@ -45,6 +45,9 @@ enum { FP8_OPS_BLOCK_SCALE = 0, FP8_OPS_ROW_SCALE = 1 };
static inline int fp8_ops(const RadArgs* a, Fp8Ops* g, int want_ascale,
int wscale = FP8_OPS_BLOCK_SCALE) {
std::memset(g, 0, sizeof(*g));
/* No fp8 or int8 block GEMM reads a partitioned weight's `pb1`/`pb2`; refused, not ignored (see
* gemm_ops). */
if (r4d_geti_or(a, "pb1", 0) > 0 || r4d_geti_or(a, "pb2", 0) > 0) return R4D_NO(RAD_E_UNSUPPORTED);
g->a = r4d_opt(a, F_A);
g->ascale = r4d_opt(a, F_ASCALE);
g->b = r4d_opt(a, F_B);