FOSCAR: Accelerating Decode Attention over 2- and 4-Bit KV Caches through Affine Folding
TL;DR - FOSCAR accelerates LLM decode attention over 2-bit and 4-bit KV caches by folding quantization scaling and offsets into other attention operations. It substantially improves GPU kernel and long-context serving throughput on H100 and B200 hardware.
- Affine folding cuts scale-and-offset operations by up to two orders of magnitude while preserving exact-arithmetic dequantized outputs.
- Warp-specialized Hopper and Blackwell kernels efficiently feed quantized KV operands into Tensor Cores.
- On H100, INT2 kernels achieve 3.36Ă— geometric-mean speedup over FlashInfer BF16; on B200, they achieve 2.67Ă—.
- Integrated into SGLang, FOSCAR raises peak aggregate long-context throughput by up to 170% over 2-bit and 341% over 16-bit baselines.