TensorX
返回文献探索

Paper · arXiv 2404.07143

Leave No Context Behind: Efficient Infinite Context Transformers with Infini-attention

Tsendsuren Munkhdalai, Manaal Faruqui, Siddharth Gopal

111 upvotesApril 10, 2024arXiv 预印本
AI 摘要

A novel Infini-attention mechanism allows Transformer-based LLMs to handle infinitely long inputs with limited memory and compute, enabling efficient long-context modeling and fast inference.

Infini-attentionTransformer-based Large Language Models (LLMs)compressive memorymasked local attentionlong-term linear attentionlong-context language modelingstreamlining inference

Abstract

This work introduces an efficient method to scale Transformer-based Large Language Models (LLMs) to infinitely long inputs with bounded memory and computation. A key component in our proposed approach is a new attention technique dubbed Infini-attention. The Infini-attention incorporates a compressive memory into the vanilla attention mechanism and builds in both masked local attention and long-term linear attention mechanisms in a single Transformer block. We demonstrate the effectiveness of our approach on long-context language modeling benchmarks, 1M sequence length passkey context block retrieval and 500K length book summarization tasks with 1B and 8B LLMs. Our approach introduces minimal bounded memory parameters and enables fast streaming inference for LLMs.

北京市昌平区探索星信息技术及软件开发工作室

京ICP备2026059466号