Encoding cached within llms saves space and speeds up queries
Cache the Encoder Within:Compact, Reusable Memory across LLM Queries
Summary
When asking a large language model (LLM) multiple questions about the same documents, the model often has to process the same information repeatedly, which wastes time and computing power. The authors introduce EncBank, a technique that stores a small, reusable memory of the first part of the model’s understanding of a document. This stored memory can be used later for new questions, making the process faster and using less storage space. They tested EncBank on different models and tasks, showing it keeps accuracy close to the original method while using less storage and speeding up some operations. However, how well it works depends on the tasks and how often the stored memory is reused.
What this means in practice
- •For ai infrastructure teams: Reduce GPU memory usage and speed up repeated LLM queries on shared documents by caching intermediate encoder outputs efficiently.
- •For cloud service operators: Offer more cost-effective LLM query services by storing compact reusable memory states to handle repeated user queries with less compute overhead.$Commercial implications: Enables scalable and cost-efficient deployment of multi-query LLM services by reducing persistent GPU storage needs without large accuracy loss.