Laat uw LLM de context optimaal benutten
Make Your LLM Fully Utilize the Context
April 25, 2024
Auteurs: Shengnan An, Zexiong Ma, Zeqi Lin, Nanning Zheng, Jian-Guang Lou
cs.AI
Samenvatting
Hoewel veel hedendaagse grote taalmodellen (LLM's) lange invoer kunnen verwerken, hebben ze nog steeds moeite om informatie binnen de lange context volledig te benutten, een fenomeen dat bekend staat als de lost-in-the-middle uitdaging. Wij veronderstellen dat dit voortkomt uit onvoldoende expliciete supervisie tijdens de lange-context training, waarbij niet wordt benadrukt dat elke positie in een lange context cruciale informatie kan bevatten. Gebaseerd op deze intuïtie presenteert onze studie informatie-intensieve (IN2) training, een puur data-gedreven oplossing om lost-in-the-middle te overwinnen. Specifiek maakt IN2 training gebruik van een gesynthetiseerde lange-context vraag-antwoord dataset, waarbij het antwoord vereist (1) fijnmazige informatiebewustwording op een kort segment (~128 tokens) binnen een gesynthetiseerde lange context (4K-32K tokens), en (2) de integratie en redenering van informatie uit twee of meer korte segmenten. Door deze informatie-intensieve training toe te passen op Mistral-7B, presenteren we FILM-7B (FILl-in-the-Middle). Om het vermogen van FILM-7B om lange contexten te benutten grondig te beoordelen, ontwerpen we drie verkennende taken die verschillende contextstijlen omvatten (document, code en gestructureerde-data context) en informatie-ophaalpatronen (voorwaarts, achterwaarts en tweerichtingsverkeer). De verkennende resultaten tonen aan dat FILM-7B robuust informatie kan ophalen uit verschillende posities in zijn 32K contextvenster. Naast deze verkennende taken verbetert FILM-7B de prestaties aanzienlijk op real-world lange-context taken (bijv. 23.5->26.9 F1-score op NarrativeQA), terwijl het een vergelijkbare prestatie behoudt op korte-context taken (bijv. 59.3->59.2 nauwkeurigheid op MMLU). Github Link: https://github.com/microsoft/FILM.
English
While many contemporary large language models (LLMs) can process lengthy
input, they still struggle to fully utilize information within the long
context, known as the lost-in-the-middle challenge. We hypothesize that it
stems from insufficient explicit supervision during the long-context training,
which fails to emphasize that any position in a long context can hold crucial
information. Based on this intuition, our study presents information-intensive
(IN2) training, a purely data-driven solution to overcome lost-in-the-middle.
Specifically, IN2 training leverages a synthesized long-context question-answer
dataset, where the answer requires (1) fine-grained information awareness on a
short segment (~128 tokens) within a synthesized long context (4K-32K tokens),
and (2) the integration and reasoning of information from two or more short
segments. Through applying this information-intensive training on Mistral-7B,
we present FILM-7B (FILl-in-the-Middle). To thoroughly assess the ability of
FILM-7B for utilizing long contexts, we design three probing tasks that
encompass various context styles (document, code, and structured-data context)
and information retrieval patterns (forward, backward, and bi-directional
retrieval). The probing results demonstrate that FILM-7B can robustly retrieve
information from different positions in its 32K context window. Beyond these
probing tasks, FILM-7B significantly improves the performance on real-world
long-context tasks (e.g., 23.5->26.9 F1 score on NarrativeQA), while
maintaining a comparable performance on short-context tasks (e.g., 59.3->59.2
accuracy on MMLU). Github Link: https://github.com/microsoft/FILM.