arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2503.22196cs.CL
收藏

EdgeInfinite:面向边缘设备的内存高效无限上下文Transformer

EdgeInfinite: A Memory-Efficient Infinite-Context Transformer for Edge Devices

vivo AI Lab(vivo人工智能实验室);Zhejiang University(浙江大学)

Jiyu Chen, Shuang Peng, Daxiong Luo, Fan Yang, Renshou Wu, Fangyuan Li, Xiaoxin Chen

AI总结:

EdgeInfinite通过可训练门控模块将压缩内存集成到Transformer中,实现边缘设备上的无限上下文处理,兼容标准架构且仅微调少量参数,在长上下文基准上性能相当并优化内存与首令牌时间。

摘要:

基于Transformer的大语言模型(LLMs)在处理边缘设备上的长序列时面临挑战,原因是注意力机制的二次复杂度和键值(KV)缓存带来的不断增长的内存需求。现有的KV缓存优化在长输出任务中难以应对不可逆的令牌驱逐问题,而替代的序列建模架构在既有Transformer基础设施内采用成本高昂。我们提出EdgeInfinite,一种内存高效的无限上下文解决方案,通过可训练的存储门控模块将压缩内存集成到基于Transformer的LLMs中。该方法与标准Transformer架构保持完全兼容,仅需微调少量参数,并能选择性激活存储门控模块以进行长上下文和短上下文的任务路由。实验结果表明,EdgeInfinite在长上下文基准上实现了与基线基于Transformer的LLM相当的性能,同时优化了内存消耗和首令牌时间。

英文摘要:

Transformer-based large language models (LLMs) encounter challenges in processing long sequences on edge devices due to the quadratic complexity of attention mechanisms and growing memory demands from Key-Value (KV) cache. Existing KV cache optimizations struggle with irreversible token eviction in long-output tasks, while alternative sequence modeling architectures prove costly to adopt within established Transformer infrastructure. We present EdgeInfinite, a memory-efficient solution for infinite contexts that integrates compressed memory into Transformer-based LLMs through a trainable memory-gating module. This approach maintains full compatibility with standard Transformer architectures, requiring fine-tuning only a small part of parameters, and enables selective activation of the memory-gating module for long and short context task routing. The experimental result shows that EdgeInfinite achieves comparable performance to baseline Transformer-based LLM on long context benchmarks while optimizing memory consumption and time to first token.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑