Языковые модели могут самостоятельно увеличивать длину для генерации длинных текстов.
Language Models can Self-Lengthen to Generate Long Texts
October 31, 2024
Авторы: Shanghaoran Quan, Tianyi Tang, Bowen Yu, An Yang, Dayiheng Liu, Bofei Gao, Jianhong Tu, Yichang Zhang, Jingren Zhou, Junyang Lin
cs.AI
Аннотация
Недавние достижения в области крупных языковых моделей (LLM) значительно улучшили их способность обрабатывать длинные контексты, однако остается заметный разрыв в генерации длинных, выровненных выводов. Это ограничение происходит из разрыва в обучении, где предварительное обучение не обеспечивает эффективных инструкций для генерации длинных текстов, а данные после обучения в основном состоят из коротких пар запрос-ответ. Текущие подходы, такие как обратный перевод инструкций и имитация поведения, сталкиваются с проблемами, включая качество данных, авторские права и ограничения на использование собственных моделей. В данной статье мы представляем инновационную итеративную обучающую структуру под названием Self-Lengthen, которая использует только внутренние знания и навыки LLM без необходимости во вспомогательных данных или собственных моделях. Структура состоит из двух ролей: Генератора и Расширителя. Генератор производит первоначальный ответ, который затем разделяется и расширяется Расширителем. Этот процесс приводит к новому, более длинному ответу, который используется для итеративного обучения как Генератора, так и Расширителя. Через этот процесс модели постепенно обучаются обрабатывать все более длинные ответы. Эксперименты на стандартных наборах данных и оценки людей показывают, что Self-Lengthen превосходит существующие методы в генерации длинных текстов, когда применяется к ведущим открытым LLM, таким как Qwen2 и LLaMA3. Наш код общедоступен по адресу https://github.com/QwenLM/Self-Lengthen.
English
Recent advancements in Large Language Models (LLMs) have significantly
enhanced their ability to process long contexts, yet a notable gap remains in
generating long, aligned outputs. This limitation stems from a training gap
where pre-training lacks effective instructions for long-text generation, and
post-training data primarily consists of short query-response pairs. Current
approaches, such as instruction backtranslation and behavior imitation, face
challenges including data quality, copyright issues, and constraints on
proprietary model usage. In this paper, we introduce an innovative iterative
training framework called Self-Lengthen that leverages only the intrinsic
knowledge and skills of LLMs without the need for auxiliary data or proprietary
models. The framework consists of two roles: the Generator and the Extender.
The Generator produces the initial response, which is then split and expanded
by the Extender. This process results in a new, longer response, which is used
to train both the Generator and the Extender iteratively. Through this process,
the models are progressively trained to handle increasingly longer responses.
Experiments on benchmarks and human evaluations show that Self-Lengthen
outperforms existing methods in long-text generation, when applied to top
open-source LLMs such as Qwen2 and LLaMA3. Our code is publicly available at
https://github.com/QwenLM/Self-Lengthen.Summary
AI-Generated Summary