ChatQA 2: Colmare il Divario con i Modelli Linguistici Proprietari nelle Capacità di Contesto Esteso e RAG
ChatQA 2: Bridging the Gap to Proprietary LLMs in Long Context and RAG Capabilities
July 19, 2024
Autori: Peng Xu, Wei Ping, Xianchao Wu, Zihan Liu, Mohammad Shoeybi, Bryan Catanzaro
cs.AI
Abstract
In questo lavoro, presentiamo ChatQA 2, un modello basato su Llama3 progettato per colmare il divario tra i modelli LLM open-access e i principali modelli proprietari (ad esempio, GPT-4-Turbo) nelle capacità di comprensione del contesto lungo e di generazione aumentata dal recupero (RAG). Queste due capacità sono essenziali affinché i LLM possano elaborare grandi volumi di informazioni che non possono essere contenuti in un singolo prompt e sono complementari tra loro, a seconda dei task downstream e dei budget computazionali. Presentiamo una ricetta dettagliata per il training continuo per estendere la finestra contestuale di Llama3-70B-base da 8K a 128K token, insieme a un processo di tuning delle istruzioni in tre fasi per migliorare le capacità del modello nel seguire le istruzioni, nelle prestazioni RAG e nella comprensione del contesto lungo. I nostri risultati dimostrano che il modello Llama3-ChatQA-2-70B raggiunge un'accuratezza comparabile a GPT-4-Turbo-2024-0409 in molti task di comprensione del contesto lungo e lo supera nel benchmark RAG. È interessante notare che il miglior retriever per contesti lunghi attualmente disponibile può alleviare il problema della frammentazione del contesto top-k in RAG, migliorando ulteriormente i risultati basati su RAG per i task di comprensione del contesto lungo. Forniamo inoltre ampie comparazioni tra le soluzioni RAG e quelle per contesti lunghi utilizzando i migliori LLM per contesti lunghi attualmente disponibili.
English
In this work, we introduce ChatQA 2, a Llama3-based model designed to bridge
the gap between open-access LLMs and leading proprietary models (e.g.,
GPT-4-Turbo) in long-context understanding and retrieval-augmented generation
(RAG) capabilities. These two capabilities are essential for LLMs to process
large volumes of information that cannot fit into a single prompt and are
complementary to each other, depending on the downstream tasks and
computational budgets. We present a detailed continued training recipe to
extend the context window of Llama3-70B-base from 8K to 128K tokens, along with
a three-stage instruction tuning process to enhance the model's
instruction-following, RAG performance, and long-context understanding
capabilities. Our results demonstrate that the Llama3-ChatQA-2-70B model
achieves accuracy comparable to GPT-4-Turbo-2024-0409 on many long-context
understanding tasks and surpasses it on the RAG benchmark. Interestingly, we
find that the state-of-the-art long-context retriever can alleviate the top-k
context fragmentation issue in RAG, further improving RAG-based results for
long-context understanding tasks. We also provide extensive comparisons between
RAG and long-context solutions using state-of-the-art long-context LLMs.