SuperAPI AI Directory

Self-Lengthen - Alibaba Qwen's iterative training framework for improving output length

Author: AI小集 · Original source: AI工具集

What is Self-Lengthen

Self-Lengthen is an innovative iterative training framework launched by the Alibaba Qwen team, capable of improving the ability of large language models (LLMs) to generate long text. The framework is based on two roles, a generator and an extender, working together. The generator is responsible for generating an initial response, and the extender splits and expands the response to produce longer text. The entire process continuously iterates, gradually training the model to handle longer outputs. Self-Lengthen requires no additional data or proprietary models, and based on the intrinsic knowledge and skills of LLMs, effectively solves the training deficiency problem in long text generation.

Self-Lengthen

Main features of Self-Lengthen

  • Improve output length: Enables LLMs to generate longer text outputs than traditional training methods.
  • Maintain content quality: While extending text length, maintains or even improves the coherence and relevance of the generated content.
  • No additional data required: Does not rely on external data sources or proprietary models, and is based on the model's intrinsic knowledge and skills.
  • Iterative training: Gradually improves the model's ability to handle long text through an iterative process.
  • Flexibility: Can be applied to a variety of different long text generation tasks, including literary creation, academic research, and more.

Technical principles of Self-Lengthen

  • Generator and Extender:
    • Generator: Responsible for generating the initial short text response.
    • Extender: Takes the generator's output as input and expands it into long text.
  • Iterative training process:
    • Based on repeated iteration, gradually increases the generator's and extender's ability to handle long text.
    • In each iteration, the extender attempts to expand the generator's output even longer, and uses the longer output to fine-tune the generator to directly generate longer text.
  • Instruction augmentation: Uses self-instruct techniques to expand and diversify training instructions, better guiding the model to generate long text.
  • Two-stage expansion method:
    • First stage: The extender expands the first half of the generator's output.
    • Second stage: Uses the expansion result from the first stage to guide the expansion of the remaining part, achieving expansion of the entire text.
  • Fine-tune the model: Uses the longer text obtained from expansion to fine-tune the generator and extender, facilitating the generation of longer text in future iterations.
  • Quality control: Uses rule-based and evaluation mechanisms to ensure the quality of generated long text, avoiding repetitive and meaningless expansion.

Project address of Self-Lengthen

Application scenarios of Self-Lengthen

  • Creative writing: Used to generate long-form literary works such as novels, stories, and scripts.
  • Academic research: Assists scholars and researchers in writing academic papers, technical reports, and research proposals.
  • News media: Used to write news reports, in-depth articles, and feature reports, providing detailed content coverage.
  • Educational content development: Creates educational materials, course content, and textbooks, providing in-depth teaching resources.
  • Business copywriting: Write marketing copy, advertising content, business plans, and other business documents.