[KongchangAI]
Concept

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)

Dec 1

The ZenMargin scheme claims to achieve fast and accurate 4-bit attention without any FP16 backup.

Unverified50%
Dec 1

ZenMargin uses causal centering and a lightweight Hadamard transform to smooth the error concentration along the dominant directions.

Unverified50%
Dec 1

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.

Unverified50%
Dec 1

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.

Unverified50%
Dec 1

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.

Unverified50%
Dec 1

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.

Unverified50%
Dec 1

For time to first token (TTFT) with a 64K context, ZenMargin delivers up to 1.9x speedup.

Unverified50%
Dec 1

ZenMargin-Cache reduces KV cache memory by 44% compared with BF16.

Unverified50%
Dec 1

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.

Unverified50%
Dec 1

Without retraining, ZenMargin matches BF16 accuracy on the full 13-task RULER (up to 67.6K) and LongBench benchmarks.

Unverified50%

All Facts (10)

Source Articles