Anchor-based Large Language Models
Preprint
Abstract
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.Keywords
All Related Versions
This publication has 10 references indexed in Scilit:
- Salute the Classic: Revisiting Challenges of Machine Translation in the Age of Large Language ModelsTransactions of the Association for Computational Linguistics, 2025
- PDFTriage: Question Answering over Long, Structured Documents2024
- LongLLMLingua: Accelerating and Enhancing LLMs in Long Context Scenarios via Prompt Compression2024
- ParroT: Translating during Chat using Large Language Models tuned with Human Translation and Feedback2023
- Parallel Context Windows for Large Language Models2023
- BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding2019
- BoolQ: Exploring the Surprising Difficulty of Natural Yes/No Questions2019
- Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answering2018
- Crowdsourcing Multiple Choice Science Questions2017
- Joint Learning of Sentence Embeddings for Relevance and Entailment2016