바늘에 실 꿰기: LLM이 거의 백만 규모의 건초더미 속 실을 따라갈 수 있는가?
Needle Threading: Can LLMs Follow Threads through Near-Million-Scale Haystacks?
November 7, 2024
저자: Jonathan Roberts, Kai Han, Samuel Albanie
cs.AI
초록
대형 언어 모델(LLMs)의 컨텍스트 한계가 증가함에 따라, 가능한 응용 프로그램 및 하위 기능의 범위도 확장되고 있다. 많은 실제 작업에서, 결정은 주로 관련 없는 정보를 포함하는 종종 이질적인 문서 모음에 흩어져 있는 세부 사항에 의존한다. 장문 컨텍스트 LLMs는 전통적으로 비용이 많이 들고 시간이 소요되는 이러한 형태의 복잡한 정보 검색 및 추론에 적합해 보인다. 그러나 최근 몇 년 동안 더 긴 컨텍스트 모델의 개발이 급속히 진행되었음에도 불구하고, LLMs가 컨텍스트를 얼마나 효과적으로 사용하는지에 대한 이해는 그 속도를 따라잡지 못하고 있다. 이를 해결하기 위해, 우리는 17개의 주요 LLMs의 능력을 평가하기 위해 설계된 일련의 검색 실험을 수행한다. 예를 들어, 컨텍스트 창을 통해 정보의 흐름을 따라가는 능력 등을 평가한다. 놀랍게도, 많은 모델이 여러 흐름을 동시에 따라가면서도 성능의 유의미한 손실 없이 이를 수행할 수 있는 것으로 나타났다. 그러나 많은 모델의 경우, 지원되는 컨텍스트 길이보다 실제 컨텍스트 한계가 상당히 짧으며, 컨텍스트 창이 커질수록 정확도가 감소하는 것으로 나타났다. 또한, 우리의 연구는 서로 다른 토크나이저의 토큰 수를 직접 비교해서는 안 된다는 중요한 점을 강조한다. 이들은 종종 상당히 다른 수의 문자에 해당한다. 우리는 코드와 장문 컨텍스트 실험 데이터를 공개한다.
English
As the context limits of Large Language Models (LLMs) increase, the range of
possible applications and downstream functions broadens. In many real-world
tasks, decisions depend on details scattered across collections of often
disparate documents containing mostly irrelevant information. Long-context LLMs
appear well-suited to this form of complex information retrieval and reasoning,
which has traditionally proven costly and time-consuming. However, although the
development of longer context models has seen rapid gains in recent years, our
understanding of how effectively LLMs use their context has not kept pace. To
address this, we conduct a set of retrieval experiments designed to evaluate
the capabilities of 17 leading LLMs, such as their ability to follow threads of
information through the context window. Strikingly, we find that many models
are remarkably threadsafe: capable of simultaneously following multiple threads
without significant loss in performance. Still, for many models, we find the
effective context limit is significantly shorter than the supported context
length, with accuracy decreasing as the context window grows. Our study also
highlights the important point that token counts from different tokenizers
should not be directly compared -- they often correspond to substantially
different numbers of written characters. We release our code and long-context
experimental data.