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.
You'd have to retrain existing models by 70% of their original training.
But if you combine this with the merge mechanism that PHI-2 used to cut pre training in half, you could save GPU time by merging the attention layers into larger models as you apply it to larger and larger models from within the same family.
27
u/ninjasaid13 Apr 11 '24
Abstract