ChatPaper.aiChatPaper

LongWriter: 장문 문맥 LLMs로부터 10,000단어 이상 생성하기

LongWriter: Unleashing 10,000+ Word Generation from Long Context LLMs

August 13, 2024
저자: Yushi Bai, Jiajie Zhang, Xin Lv, Linzhi Zheng, Siqi Zhu, Lei Hou, Yuxiao Dong, Jie Tang, Juanzi Li
cs.AI

초록

현재의 긴 문맥 대형 언어 모델(Large Language Models, LLMs)은 최대 100,000 토큰의 입력을 처리할 수 있지만, 심지어 2,000 단어에 미치지 못하는 길이의 출력을 생성하는 데 어려움을 겪습니다. 통제된 실험을 통해, 우리는 모델의 효과적인 생성 길이가 감독된 세밀 조정(Supervised Fine-Tuning, SFT) 중에 본 샘플에 의해 본질적으로 제한된 것을 발견했습니다. 다시 말해, 그들의 출력 제한은 기존 SFT 데이터셋에서 긴 출력 예제의 부족으로 인한 것입니다. 이를 해결하기 위해, 우리는 AgentWrite를 소개합니다. 이는 에이전트 기반 파이프라인으로, 초장기 생성 작업을 하위 작업으로 분해하여 기존 LLMs가 일관된 출력을 생성할 수 있도록 합니다. AgentWrite를 활용하여 우리는 20,000 단어를 초과하는 일관된 출력을 생성할 수 있습니다. AgentWrite를 활용하여 우리는 2k에서 32k 단어로 출력 길이가 다양한 6,000개의 SFT 데이터를 포함하는 LongWriter-6k 데이터셋을 구축했습니다. 이 데이터셋을 모델 훈련에 통합함으로써, 우리는 기존 모델의 출력 길이를 10,000 단어 이상으로 확장하면서 출력 품질을 유지하는 데 성공했습니다. 또한, 초장기 생성 능력을 평가하기 위한 포괄적인 벤치마크인 LongBench-Write를 개발했습니다. DPO를 통해 더욱 향상된 9B 매개변수 모델은 이 벤치마크에서 최첨단 성능을 달성하여 훨씬 더 큰 전용 모델을 능가했습니다. 일반적으로, 우리의 연구는 기존의 긴 문맥 LLM이 이미 더 큰 출력 창을 위한 잠재력을 갖고 있음을 보여줍니다. 모델 정렬 중에 확장된 출력을 갖는 데이터만 있으면 이 능력을 발휘할 수 있습니다. 우리의 코드 및 모델은 다음에서 확인할 수 있습니다: https://github.com/THUDM/LongWriter.
English
Current long context large language models (LLMs) can process inputs up to 100,000 tokens, yet struggle to generate outputs exceeding even a modest length of 2,000 words. Through controlled experiments, we find that the model's effective generation length is inherently bounded by the sample it has seen during supervised fine-tuning (SFT). In other words, their output limitation is due to the scarcity of long-output examples in existing SFT datasets. To address this, we introduce AgentWrite, an agent-based pipeline that decomposes ultra-long generation tasks into subtasks, enabling off-the-shelf LLMs to generate coherent outputs exceeding 20,000 words. Leveraging AgentWrite, we construct LongWriter-6k, a dataset containing 6,000 SFT data with output lengths ranging from 2k to 32k words. By incorporating this dataset into model training, we successfully scale the output length of existing models to over 10,000 words while maintaining output quality. We also develop LongBench-Write, a comprehensive benchmark for evaluating ultra-long generation capabilities. Our 9B parameter model, further improved through DPO, achieves state-of-the-art performance on this benchmark, surpassing even much larger proprietary models. In general, our work demonstrates that existing long context LLM already possesses the potential for a larger output window--all you need is data with extended output during model alignment to unlock this capability. Our code & models are at: https://github.com/THUDM/LongWriter.

Summary

AI-Generated Summary

PDF676November 28, 2024