LogQuant: Log-Gedistribueerde 2-Bits Kwantisatie van KV-Cache met Superieure Nauwkeurigheidsbehoud
LogQuant: Log-Distributed 2-Bit Quantization of KV Cache with Superior Accuracy Preservation
March 25, 2025
Auteurs: Han Chen, Zicong Jiang, Zining Zhang, Bingsheng He, Pingyi Luo, Mian Lu, Yuqiang Chen
cs.AI
Samenvatting
We introduceren LogQuant, een baanbrekende 2-bit kwantiseringsmethode voor KV Cache in de inferentie van grote taalmodellen (LLM), die aanzienlijke geheugenbesparingen oplevert terwijl superieure prestaties behouden blijven. Eerdere methodes gaan ervan uit dat latere tokens belangrijker zijn of proberen belangrijke tokens te voorspellen op basis van eerdere aandachtspatronen. Beide benaderingen kunnen echter leiden tot prestatieknelpunten of frequente misvoorspellingen.
LogQuant kiest voor een andere aanpak. Door een logaritmisch filtermechanisme toe te passen, comprimeert het selectief de KV Cache over de gehele context, wat betere prestaties oplevert met hetzelfde of zelfs een verlaagd geheugengebruik in vergelijking met bestaande methodes. In benchmarktests verhoogt het de doorvoersnelheid met 25% en vergroot het de batchgrootte met 60% zonder het geheugengebruik te verhogen. Voor uitdagende taken zoals Wiskunde en Code Completion verbetert LogQuant de nauwkeurigheid met 40% tot 200% bij dezelfde compressieratio, wat superieur is aan vergelijkbare technieken. LogQuant integreert moeiteloos met populaire inferentieframeworks zoals Python's transformers-bibliotheek. Implementatie is beschikbaar op https://github.com/Concyclics/LogQuantKV.
English
We introduce LogQuant, a groundbreaking 2-bit quantization technique for KV
Cache in large language model (LLM) inference, delivering substantial memory
savings while preserving superior performance. Previous methods either assume
that later tokens are more important or attempt to predict important tokens
based on earlier attention patterns. Both approaches, however, can result in
performance bottlenecks or frequent mispredictions.
LogQuant takes a different approach. By applying a log-based filtering
mechanism, it selectively compresses the KV Cache across the entire context,
achieving better performance with the same or even reduced memory footprint
compared to existing methods. In benchmark tests, it enhances throughput by 25%
and boosts batch size by 60% without increasing memory consumption. For
challenging tasks such as Math and Code Completion, LogQuant improves accuracy
by 40% to 200% at the same compression ratio, outperforming comparable
techniques.LogQuant integrates effortlessly with popular inference frameworks
like Python's transformers library. Implementation can be available in
https://github.com/Concyclics/LogQuantKV.Summary
AI-Generated Summary