# Poster 30638

- Kind: Poster
- Talk page and recording: https://iclr.cc/virtual/2025/poster/30638

> Transcript of the talk's recording (session_asr), made by speech recognition or taken from the host's captions. It may contain errors. The words are the speakers'; listen to the recording on the talk's page before quoting it.

Hi, we want to introduce MagicPig, LSH sampling for efficient OOM generation today. Long context OOMs are very powerful and very popular with very different applications. However, they are very expensive to deploy. The KV cache grows linearly with context length.
And this limits the maximum baseline in some system, and finally resulting in low efficiency. So we need to design more efficient algorithms than systems following Connell's law, and people meet a dilemma here. People design different dynamic heuristic compression algorithms to achieve higher model performance compared to static ones.
However, this will require large memory because they want to store the entire cave cache and only retrieve the most relevant one at runtime. And this is our new opportunity. We can store the most frequently accessed cave cache on GPUs and the others on CPUs. And another key observation is that CPU's memory bandwidth is only 10 times slower than GPUs.
And attention is always memory-bounded. So CPU is 100 times worse false, does not matter at all. And now what I did is to use 10 times dynamic sparse to mitigate the gap between CPU and GPU and computer attention directly on CPU to avoid the bottleneck or PCIe.
However, another challenge is that Tokay also feels in some complicated benchmark, for example in CWE and FWE, in ruler and also reasoning benchmark. So we need to go beyond Tokay attention. We found that the Oracle sampling estimation actually go beyond Tokay attention, and it achieves much lower estimation error.
and performs better on dancing tasks. Here is a very intuitive example to explain why sampling can go beyond topic attention when we want to estimate a number or a high-dimensional vector. So we want to do sampling, not only search. Finally, we applied locality -sensitive hashing.
into something presents which is introduced about 20 years ago and have much applications now and now we apply it to model decoding here is a system architecture of magic peak we do linear functions and random projections on GPUs and store most of the things on CPUs
Including hash table, including KVCache, and actually this practice can enable very very large hash tables since we store it on the CPU memory compared to the reformer compared to many previous work. At runtime, we use the RSI retrieval to retrieve the KVCache from the hash tables.
and using the CPUs to change the server to compute the change output. So that is MeasurePeak. We use CPUs as our infinite memory and with MeasurePeak we can use V100 plus a powerful CPUs to outperform the throughput of A100. And we evaluate MeasurePeak on ruler benchmark for retrieval and also reasoning benchmark.
In GSM Ethernet, and with only sometimes, it can even beat exact object attention. And the Magic Pick achieves 1 .5 to 5 times improved improvement. Thank you.
