Giraffe: Adventures in Expanding Context Lengths in LLMs
Arka Pal111Correspondence to Abacus.AI Deep Karkhanis Abacus.AI Manley Roberts Abacus.AI Samuel Dooley Abacus.AI Arvind Sundararajan Abacus.AI Siddartha Naidu Abacus.AI
Abstract
Modern large language models (LLMs) that rely on attention mechanisms are typically trained with fixed context lengths which enforce upper limits on the length of input sequences that they can handle at evaluation time. To use these models on sequences longer than the train-time context length, one might employ techniques from the growing family of context length extrapolation methods — most of which focus on modifying the system of positional encodings used in the attention mechanism to indicate where tokens or activations are located in the input sequence. We conduct a wide survey of existing methods of context length extrapolation on a base LLaMA or LLaMA 2 model, and introduce some of our own design as well — in particular, a new truncation strategy for modifying the basis for the position encoding.
原文 arXiv:2308.10882;中英对照 + 大白话阅读 https://aha.fim.ai/paper/2308.10882v1