In plain words: The model is trained to squeeze its conversation memory into a shorter form every few words, keeping every detail instead of throwing some away as usual. It does this in one pass with no helper model, cutting memory and computing costs without loss.
Abstract
Large Language Models (LLMs) face limitations due to the high demand on GPU memory and computational resources when handling long contexts. While sparsify the Key-Value (KV) cache of transformer model is a typical strategy to alleviate resource usage, it unavoidably results in the loss of information. We introduce Lossless Compressed Memory Attention (LoMA), a novel approach that enables lossless compression of the KV cache, thereby reducing the memory and computational demands during autoregressive generation. LoMA incorporates a specialized training or fine-tuning precedure alongside an autoregressive generation algorithm optimized for the compressed context. Our method compresses the KV cache after every $tc$ generated tokens with a compression ratio of $c$ and a target compressed length $t$, and this process occurs within a single inference pass without dependency on auxiliary models. We engineered an efficient training scheme involving specific inputs, attention masks, and position identifiers to instill this compression capability. Experimental validation has demonstrated that LoMA significantly reducing computational consumption and memory usage through achieving lossless KV cache compression.
Yumeng Wang, Zhenyang Xiao
arXiv:2401.09486 · cs.LG, cs.CL · submitted Jan 16, 2024 · updated Feb 4, 2024
abstract · pdf · html
What a weird line in Figure 2
> Note: L_LM represents L_LM, and L_Repeat represents L_Repeat, and Loss represents L.
Tautology is not helpful here.
And what's everyone's aversion to log plots? Figure 3 is unreadable but would be perfect with log.
And where's the Appendix? It's referenced from the paper.... I'm also unconvinced it's lossless