libquant: the m2xfp4 quantiser -- M2XFP's metadata-augmented MXFP4, weights only, with its own decode

M2XFP (arXiv 2601.19213) keeps OCP MXFP4's codes and E8M0 exponent and adds one metadata byte a
group of 32: four 2-bit extra mantissas, each refining the shared scale of a subgroup of 8 to
(1 + k/4) . 2^E. The quantiser searches each subgroup's k and the exponent's bias by least squared
error (the paper's Sg-EM), stores codes, scale and meta as three planes of scheme "m2xfp4" and
supplies the decode hook the core needs for a scheme it cannot follow. spec.md gains the
encoding and quantiser rows; quant_m2xfp_test covers the planes, determinism and quality.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
hugypufyandClaude Opus 5.5 authored and StillDeadcode committed 2026-10-26 09:24:01 +01:00
1 parent d8b9ce3a32
commit a323b76bca
5 files changed
+613

No files matched your search

+1
View File
@@ -81,5 +81,6 @@ inline int64_t gather_units(const float* w, int64_t N, int64_t K, int64_t unit,
const RadQuantizerInfo& awq_info();
const RadQuantizerInfo& autoround_info();
const RadQuantizerInfo& paroquant_info();
const RadQuantizerInfo& m2xfp_info();
} /* namespace lq */