Clustering-driven Memory Compression for On-device Large Language Models

Read full text
Authors: Ondrej Bohdal, Pramit Saha, Umberto Michieli, Mete Ozay, Taha Yusuf Ceritli
Cited by: 0

Abstract

Large language models (LLMs) often rely on user-specific memories distilled from past interactions to enable personalized generation. A common practice is to concatenate these memories with the input prompt, but this approach quickly exhausts the limited context available in on-device LLMs. Compressing memories by averaging can mitigate context growth, yet it frequently harms performance due to semantic conflicts across heterogeneous memories. In this work, we introduce a clustering-based memory compression strategy that balances context efficiency and personalization quality. Our method groups memories by similarity and merges them within clusters prior to concatenation, thereby preserving coherence while reducing redundancy. Experiments demonstrate that our approach substantially lowers the number of memory tokens while outperforming baseline strategies such as naive averaging or direct concatenation. Furthermore, for a fixed context budget, clustering-driven merging yields more compact memory representations and consistently enhances generation quality.

Fields of Study & Subjects

Topic Modeling Natural Language Processing Techniques Speech and dialogue systems

Publication details

Journal / source
arXiv (Cornell University)
Publication date
24 January 2026
Document type
Preprint