Почему эффективная длина контекста LLM не соответствует требованиям?

Why Does the Effective Context Length of LLMs Fall Short?

October 24, 2024
Авторы: Chenxin An, Jun Zhang, Ming Zhong, Lei Li, Shansan Gong, Yao Luo, Jingjing Xu, Lingpeng Kong
cs.AI

Аннотация

Продвижения в распределенном обучении и эффективных механизмах внимания значительно увеличили размеры окон контекста крупных языковых моделей (ЯМ). Однако недавние исследования показывают, что эффективные длины контекста открытых ЯМ часто оказываются недостаточными, обычно не превышая половины их длины обучения. В данной работе мы приписываем это ограничение левоскошенному распределению частот относительных позиций, формируемому на этапах предварительного обучения и пост-обучения ЯМ, что затрудняет их способность эффективно собирать удаленную информацию. Для решения этой проблемы мы представляем метод ShifTed Rotray position embeddING (STRING). STRING сдвигает хорошо обученные позиции для перезаписи оригинальных неэффективных позиций во время вывода, улучшая производительность в пределах их существующих длин обучения. Экспериментальные результаты показывают, что без дополнительного обучения STRING значительно улучшает производительность последних крупномасштабных моделей, таких как Llama3.1 70B и Qwen2 72B, более чем на 10 пунктов на популярных длинно-контекстных бенчмарках RULER и InfiniteBench, устанавливая новые результаты state-of-the-art для открытых ЯМ. По сравнению с коммерческими моделями, Llama 3.1 70B с методом даже достигает лучшей производительности, чем GPT-4-128K и явно превосходит Claude 2 и Kimi-chat.
English
Advancements in distributed training and efficient attention mechanisms have significantly expanded the context window sizes of large language models (LLMs). However, recent work reveals that the effective context lengths of open-source LLMs often fall short, typically not exceeding half of their training lengths. In this work, we attribute this limitation to the left-skewed frequency distribution of relative positions formed in LLMs pretraining and post-training stages, which impedes their ability to effectively gather distant information. To address this challenge, we introduce ShifTed Rotray position embeddING (STRING). STRING shifts well-trained positions to overwrite the original ineffective positions during inference, enhancing performance within their existing training lengths. Experimental results show that without additional training, STRING dramatically improves the performance of the latest large-scale models, such as Llama3.1 70B and Qwen2 72B, by over 10 points on popular long-context benchmarks RULER and InfiniteBench, establishing new state-of-the-art results for open-source LLMs. Compared to commercial models, Llama 3.1 70B with \method even achieves better performance than GPT-4-128K and clearly surpasses Claude 2 and Kimi-chat.

Summary

AI-Generated Summary

PDF183November 16, 2024