FOSCAR: Accelerating Decode Attention over 2- and 4-Bit KV Caches through Affine Folding
Advanced optimization technique for ML engineers working on inference acceleration and quantization.
AI Summary
FOSCAR introduces affine folding technique to accelerate 2- and 4-bit quantized operations, achieving 3.36× speedup on H100 GPUs.
Excerpt
Large-language-model decode attention streams the key-value (KV) cache for every generated token. Packing that cache into 2-bit or 4-bit quantized integers reduces memory traffic but does not automatically translate into latency saving. Existing 2-bit fused kernels reach under 31%/15% of peak HBM throughput on H100/B200. Converting each value and applying its scale and offset before feeding Tensor Cores is a major bottleneck because instruction-issue throughput is scarce on modern GPUs. Instead
