arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2402.07616cs.CLcs.AI
收藏

基于锚点的大型语言模型

Anchor-based Large Language Models

University of Macau(澳门大学);University College London(伦敦大学学院);Tencent AI Lab(腾讯AI实验室)

Jianhui Pang, Fanghua Ye, Derek Fai Wong, Xin He, Wanshun Chen, Longyue Wang

AI总结:

本研究提出基于锚点的大型语言模型(AnLLMs),通过引入基于锚点的自注意力网络(AnSAN)和推理策略,将序列信息压缩至锚点 token 中,在保持相似准确率的同时实现高达 99% 的键/值缓存减少和 3.5 倍的推理加速。

摘要:

大型语言模型(LLMs)主要采用仅解码器的 Transformer 架构,需要保留历史 token 的键/值信息以提供上下文信息并避免冗余计算。然而,这些 LLMs 的巨大规模和参数量需要大量的 GPU 内存。这种内存需求随着输入文本长度的增加而增加,导致迫切需要更高效的信息存储和处理方法。本研究引入了基于锚点的 LLMs(AnLLMs),它利用一种创新的基于锚点的自注意力网络(AnSAN)以及基于锚点的推理策略。这种方法使 LLMs 能够将序列信息压缩到一个锚点 token 中,从而减少键/值缓存并提高推理效率。在问答基准上的实验表明,AnLLMs 保持了相似的准确率水平,同时实现了高达 99% 的键/值缓存减少和高达 3.5 倍的推理速度提升。尽管在准确率上有轻微妥协,但采用 AnSAN 技术的 AnLLMs 在资源利用和计算效率方面的显著提升突显了其在实际 LLM 应用中的潜力。

英文摘要:

Large language models (LLMs) predominantly employ decoder-only transformer architectures, necessitating the retention of keys/values information for historical tokens to provide contextual information and avoid redundant computation. However, the substantial size and parameter volume of these LLMs require massive GPU memory. This memory demand increases with the length of the input text, leading to an urgent need for more efficient methods of information storage and processing. This study introduces Anchor-based LLMs (AnLLMs), which utilize an innovative anchor-based self-attention network (AnSAN) and also an anchor-based inference strategy. This approach enables LLMs to compress sequence information into an anchor token, reducing the keys/values cache and enhancing inference efficiency. Experiments on question-answering benchmarks reveal that AnLLMs maintain similar accuracy levels while achieving up to 99% keys/values cache reduction and up to 3.5 times faster inference. Despite a minor compromise in accuracy, the substantial enhancements of AnLLMs employing the AnSAN technique in resource utilization and computational efficiency underscore their potential for practical LLM applications.

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

↑