ZenMargin
A pure 4-bit attention quantization scheme for long-context LLM inference that eliminates quantization error through causal centering, the Hadamard transform, and dual-branch NVFP4 representation, achieving high-accuracy retrieval and efficient inference without an FP16 backup.
Timeline (last 90 days)
The ZenMargin scheme claims to achieve fast and accurate 4-bit attention without any FP16 backup.
ZenMargin uses causal centering and a lightweight Hadamard transform to smooth the error concentration along the dominant directions.
ZenMargin splits each KV pair into a main 4-bit tensor and a residual 4-bit tensor that share the same scaling factor, forming a "two-limb NVFP4" representation.
In the prefill stage, ZenMargin's online margin gating reads only the main 4-bit limb to process 95-99% of blocks, and performs native refinement on FP4 tensor cores only for the remaining 1-5% of blocks near the peak.
On a single RTX 5090, tests on six open-source LLMs (with context lengths up to 128K) show that ZenMargin achieves 867-967 TFLOPS of throughput on real activations.
ZenMargin's throughput is 4.0-4.4 times that of FlashAttention-2 and 1.5-1.6 times that of SageAttention2++, and it is also faster than FlashInfer NVFP4.
For time to first token (TTFT) with a 64K context, ZenMargin delivers up to 1.9x speedup.
ZenMargin-Cache reduces KV cache memory by 44% compared with BF16.
In 32-layer single-GPU serving, ZenMargin-Cache increases throughput to 2.1-2.9 times that of FlashInfer BF16 and also outperforms FlashInfer FP8.
Without retraining, ZenMargin matches BF16 accuracy on the full 13-task RULER (up to 67.6K) and LongBench benchmarks.
All Facts (10)
The ZenMargin scheme claims to achieve fast and accurate 4-bit attention without any FP16 backup.
50%UnverifiedZenMargin uses causal centering and a lightweight Hadamard transform to smooth the error concentration along the dominant directions.
50%UnverifiedZenMargin splits each KV pair into a main 4-bit tensor and a residual 4-bit tensor that share the same scaling factor, forming a "two-limb NVFP4" representation.
50%UnverifiedIn the prefill stage, ZenMargin's online margin gating reads only the main 4-bit limb to process 95-99% of blocks, and performs native refinement on FP4 tensor cores only for the remaining 1-5% of blocks near the peak.
50%UnverifiedOn a single RTX 5090, tests on six open-source LLMs (with context lengths up to 128K) show that ZenMargin achieves 867-967 TFLOPS of throughput on real activations.
50%UnverifiedZenMargin's throughput is 4.0-4.4 times that of FlashAttention-2 and 1.5-1.6 times that of SageAttention2++, and it is also faster than FlashInfer NVFP4.
50%UnverifiedFor time to first token (TTFT) with a 64K context, ZenMargin delivers up to 1.9x speedup.
50%UnverifiedZenMargin-Cache reduces KV cache memory by 44% compared with BF16.
50%UnverifiedIn 32-layer single-GPU serving, ZenMargin-Cache increases throughput to 2.1-2.9 times that of FlashInfer BF16 and also outperforms FlashInfer FP8.
50%UnverifiedWithout retraining, ZenMargin matches BF16 accuracy on the full 13-task RULER (up to 67.6K) and LongBench benchmarks.
50%