LongWriter-Zero: Mastering Ultra-Long Text Generation via Reinforcement Learning

Yuhao Wu, Yushi Bai, Zhiqiang Hu, Roy Ka-Wei Lee, Juanzi Li

International Conference on Learning Representations 2026 · Oral

Overview

The talk "LongWriter-Zero: Mastering Ultra-Long Text Generation via Reinforcement Learning" presents a novel approach to overcome the significant limitations of current Large Language Models (LLMs) in generating extremely long, high-quality text. Presented by Yuhao Wu from SUTD and THU, this work addresses the critical need for LLMs that can produce outputs far exceeding the typical 2,000-token limit, which is insufficient for tasks like writing research papers, complex stories, or detailed reports. The core innovation lies in applying Reinforcement Learning (RL) from scratch, drawing parallels with the success of RL in math reasoning tasks like DeepSeek-R1.

Watch on SlidesLive

Visual summary for LongWriter-Zero: Mastering Ultra-Long Text Generation via Reinforcement Learning by Yuhao Wu, Yushi Bai, Zhiqiang Hu, Roy Ka-Wei Lee, Juanzi Li
Visual summary for LongWriter-Zero: Mastering Ultra-Long Text Generation via Reinforcement Learning by Yuhao Wu, Yushi Bai, Zhiqiang Hu, Roy Ka-Wei Lee, Juanzi Li

Key moments

  1. 0:00 Introduction: Why ultra-long text generation is hard
  2. 0:50 LongWriter-Zero's core idea: Reinforcement Learning from scratch
  3. 2:00 Designing the three-part reward model for long-form generation
  4. 4:40 Key results: RL training, thinking models, and SOTA performance
  5. 6:00 GPT-4o and human evaluation confirm superior performance
  6. 6:30 Reinforcement Learning outperforms Supervised Fine-Tuning
  7. 8:00 Addressing hallucination using the writing reward model (Q&A)

LongWriter-Zero: Mastering Ultra-Long Text Generation via Reinforcement Learning

Speakers: Yuhao Wu (SUTD & THU); Yushi Bai; Zhiqiang Hu; Roy Ka-Wei Lee; Juanzi Li

Conference: ICLR 2026

YouTube: https://slideslive.com/39062186

Overview

The talk "LongWriter-Zero: Mastering Ultra-Long Text Generation via Reinforcement Learning" presents a novel approach to overcome the significant limitations of current Large Language Models (LLMs) in generating extremely long, high-quality text. Presented by Yuhao Wu from SUTD and THU, this work addresses the critical need for LLMs that can produce outputs far exceeding the typical 2,000-token limit, which is insufficient for tasks like writing research papers, complex stories, or detailed reports. The core innovation lies in applying Reinforcement Learning (RL) from scratch, drawing parallels with the success of RL in math reasoning tasks like DeepSeek-R1.

The central hypothesis of LongWriter-Zero is that RL can fundamentally elevate the ceiling for long-form writing, moving beyond the constraints of supervised fine-tuning (SFT) on synthetic data. The researchers introduce a sophisticated tripartite reward model encompassing length, writing quality, and format adherence, coupled with a strategy for continued pretraining of base models. This comprehensive framework enables LLMs to generate coherent, fluent, and appropriately structured ultra-long texts, demonstrating state-of-the-art performance on relevant benchmarks and marking a significant step forward in the capabilities of generative AI for demanding long-horizon writing tasks.

Background

▶ Watch: Introduction: Why ultra-long text generation is hard (0:00)

The demand for ultra-long text generation capabilities from Large Language Models (LLMs) has surged with their increasing adoption in creative, academic, and professional domains. Users frequently require LLMs to assist in writing extensive documents such as research papers, novels, detailed reports, or comprehensive articles, which often necessitate outputs far exceeding typical conversational or short-form content. However, current state-of-the-art LLMs, despite their impressive fluency and knowledge, consistently hit a practical ceiling, often generating only around 2,000 tokens (or words) before coherence degrades or the model simply stops. This limitation severely hampers their utility for truly long-form tasks.

Prior attempts to address this challenge have largely relied on two main strategies. One approach involves designing agents to synthesize long output generation data, as seen in projects like LongWriter and Sora. While these methods aim to create datasets suitable for training LLMs on longer outputs, they face inherent limitations. The quality of synthetic data generated by existing LLMs is often constrained by the capabilities of those very models, leading to a self-referential problem where the training data itself may lack the desired depth, complexity, or coherence for truly ultra-long texts. Furthermore, supervised fine-tuning (SFT) on such datasets provides a relatively weak signal for the specific goal of controlling output length and maintaining high quality over extended horizons. SFT primarily optimizes for next-token prediction, which doesn't directly encode the complex, long-term planning and quality control required for generating documents spanning thousands of tokens.

The problem, therefore, exists in the gap between the aspiration for ultra-long, high-quality text generation and the inherent architectural and training limitations of current LLMs. The lack of robust mechanisms to guide models towards sustained coherence, factual accuracy, and stylistic consistency over very long sequences, combined with the difficulty of acquiring or synthesizing sufficiently high-quality long-form training data, has made ultra-long generation a persistent hard problem in the ML/systems space. The LongWriter-Zero team posits that just as Reinforcement Learning (RL) unlocked significant gains in complex reasoning tasks like mathematics (e.g., DeepSeek-R1), it holds the potential to push the ceiling for long-form writing by providing a stronger, more direct signal for desired behaviors beyond simple token prediction.

Key Findings

▶ Watch: Designing the three-part reward model for long-form generation (2:00)

LongWriter-Zero demonstrates several pivotal findings that challenge conventional approaches to long-form text generation and highlight the transformative potential of Reinforcement Learning:

  1. RL Unlocks Ultra-Long Generation: The most significant finding is that Reinforcement Learning (RL) from scratch can indeed push the ceiling for ultra-long text generation, analogous to how it achieved breakthroughs in mathematical reasoning with models like DeepSeek-R1. This approach moves beyond the inherent limitations of Supervised Fine-Tuning (SFT) and synthetic data, enabling LLMs to generate outputs significantly longer and of higher quality than previously possible.
  1. Sophisticated Reward Modeling is Crucial: The success of LongWriter-Zero hinges on its multi-faceted reward model, comprising three distinct components: a Lengths Reward for controlling output length, a Writing Reward based on human feedback for quality, and a Format Reward for adherence to structural requirements. This sophisticated reward system provides a strong, granular signal for the complex objectives of long-form writing, effectively guiding the RL process.
  1. Strong Base Models are Essential for RL Efficiency: The research underscores the importance of starting with a capable base model. Continuing pretraining the base model (e.g., Qwen2 32B with an additional 200 billion tokens) before applying RL leads to a significantly higher starting point for performance and enables the RL process to leverage existing knowledge more efficiently, resulting in superior overall outcomes. The "continue pretrain with thinking" model consistently outperformed all other configurations.
  1. Test-Time Scaling for Thinking is Effective, but Different: While the concept of "test-time scaling" (allocating more computation for internal "thinking" during inference) is beneficial, LongWriter-Zero reveals that the optimal "thinking length" for writing tasks is distinct from math or code. Instead of very long, detailed intermediate steps, writing benefits from shorter, more focused planning and brainstorming phases (around 1,000 tokens), which help structure the output without generating drafts within the thinking stage itself.
  1. RL Outperforms SFT Significantly: Comparative results clearly indicate that the RL-based approach of LongWriter-Zero surpasses SFT methods for long-form generation. Even at early stages of RL training (e.g., step 150), the RL model demonstrates superior performance, and with a strong base model, it consistently outperforms SFT-trained models, highlighting the inefficiency and limitations of SFT data for this specific task.
  1. State-of-the-Art Performance: LongWriter-Zero achieves state-of-the-art (SOTA) performance on dedicated benchmarks like WritingBench and LongBench, outperforming strong baselines such as DeepSeek-R1, Qwen2, and Llama3. Evaluation by powerful LLMs like GPT-4o and human judges further validates its superior output quality, with a win rate exceeding 60% against other models.

Technical Deep Dive

▶ Watch: Key results: RL training, thinking models, and SOTA performance (4:40)

The core innovation of LongWriter-Zero lies in its application of Reinforcement Learning (RL) from scratch to master ultra-long text generation. The methodology is structured around answering three critical research questions, each addressing a fundamental aspect of applying RL to this complex task.

1. Designing the Long-Form Generation Reward Model

Unlike math or code generation, where correctness can be objectively verified, evaluating long-form writing requires a nuanced approach. LongWriter-Zero proposes a tripartite reward model to provide comprehensive feedback:

  • Lengths Reward: This component directly supervises the output length. An initial Large Language Model (LLM) is used to predict a target word count range for a given prompt. During RL training, the model receives a high reward if its output length falls within this predicted range. Rewards gradually decrease if the output is either too short or excessively long, ensuring the model learns to control its generation length precisely.
  • Writing Reward: This is the most crucial component for quality. It leverages human feedback, specifically pairwise comparisons, similar to methods used for general conversational LLMs. Human annotators judge which of two model outputs for a given writing prompt is superior in terms of fluency, coherence, helpfulness, and overall quality. This pairwise signal is then used to train a separate reward model using a Bradley-Terry (BT) loss. A strong LLM serves as the backbone for this reward model, enabling it to accurately discern and score writing quality, which is difficult to quantify with simple metrics. This component directly addresses issues like factual consistency and hallucination, as human feedback penalizes such errors.
  • Format Reward: This component addresses specific structural requirements and prevents reward hacking. For instance, if the instruction is "first thinking and then answer," the format reward ensures the model adheres to this structure. It also penalizes undesirable behaviors like repetitive content. This reward model helps align the generated output with explicit user instructions and implicitly avoids common pitfalls of generative models.

2. Instruction Following and Test-Time Scaling

Inspired by the success of test-time scaling in reasoning tasks (e.g., DeepSeek-R1's extensive "thinking" steps), LongWriter-Zero investigates how instruction following impacts long-form generation. Two primary prompt designs are explored:

  • "Think then answer" prompt: This instructs the model to first generate an internal "thought" process or plan before producing the final long output.
  • "Direct long output" prompt: This asks the model to generate the long text directly without explicit intermediate thinking.

The research finds that while internal "thinking" is beneficial, its nature for writing differs from math. For writing, the thinking phase is primarily for planning, brainstorming, and structuring the narrative, rather than performing detailed intermediate calculations or drafting extensive text. The "thinking length" does increase with RL training, indicating the model learns to leverage this internal process. However, it plateaus around 1,000 tokens, suggesting that overly long internal "drafting" within the thinking stage is not optimal for final output quality in writing. This contrasts with math tasks where thinking steps can be much longer and more detailed.

3. Base Model Capability for Subsequent Reinforcement Learning

The quality of the initial base model significantly impacts the efficiency and ultimate performance of the subsequent RL training. LongWriter-Zero emphasizes the need for a strong foundation.

  • Continued Pretraining: To ensure a robust base, the researchers perform continued pretraining on a strong pre-existing LLM. Specifically, they use a Qwen2 32B model and further pretrain it on an additional 200 billion tokens. This extensive pretraining imbues the model with a deeper understanding of language, facts, and writing styles, providing a much stronger starting point for the RL phase.
  • RL from Scratch: Following continued pretraining, the model undergoes reinforcement learning from scratch. This means the RL process is not merely fine-tuning an SFT model but rather building the long-form generation capability directly through iterative learning guided by the sophisticated reward model. This "RL from scratch" approach, similar to DeepSeek-R1, is posited to unlock "big gains" that SFT cannot achieve.

In summary, LongWriter-Zero integrates a meticulously designed reward system, explores effective instruction following, and leverages strong, continually pretrained base models within an RL-from-scratch paradigm. This comprehensive technical framework allows it to effectively tackle the multi-faceted challenges of ultra-long text generation, moving beyond the limitations of previous SFT and synthetic data-dependent methods.

Experimental Setup & Results

▶ Watch: Reinforcement Learning outperforms Supervised Fine-Tuning (6:30)

The experimental evaluation of LongWriter-Zero was designed to rigorously assess its performance in ultra-long text generation against state-of-the-art baselines and to validate the efficacy of its core components.

Base Model and Pretraining:

The foundation of LongWriter-Zero is a Qwen2 32B model. Prior to RL training, this base model underwent continued pretraining on an additional 200 billion tokens. This step was critical to enhance the model's general language understanding and writing capabilities, providing a robust starting point for the subsequent reinforcement learning phase.

Evaluation Benchmarks:

LongWriter-Zero was evaluated on two key benchmarks:

  1. WritingBench: A standard benchmark for assessing writing quality.
  2. LongBench: A self-created benchmark specifically designed to evaluate ultra-long text generation capabilities, focusing on aspects like coherence, relevance, and length control over extended outputs.

Baselines:

The performance of LongWriter-Zero was compared against several prominent LLMs known for their strong generative capabilities:

  • DeepSeek-R1: A model celebrated for its reasoning abilities, often used as a strong general baseline.
  • Qwen2: The base model family, evaluated without the LongWriter-Zero specific RL training.
  • Llama3: A leading open-source LLM, representing a strong competitor in generative tasks.

Metrics and Evaluation:

Performance was primarily judged by the quality and length of generated texts. Given the subjective nature of writing quality, a multi-pronged evaluation approach was employed:

  • Automated Metrics: Scores on WritingBench and LongBench, which likely incorporate metrics related to coherence, fluency, and potentially adherence to prompt instructions (though specific metrics are not detailed in the transcript, SOTA performance implies comprehensive evaluation).
  • Strong LLM as Judge: Recognizing the limitations of smaller models or purely statistical metrics for complex text, GPT-4o was used as an advanced judge. LongWriter-Zero achieved a win rate of over 60% across all models when judged by GPT-4o, indicating a significant qualitative improvement over competitors.
  • Human Evaluation: Human judges were also employed to provide unbiased assessments of writing quality, further validating the model's superior performance.

Headline Results and Ablations:

  1. SOTA Performance: LongWriter-Zero achieved state-of-the-art (SOTA) performance on both WritingBench and LongBench, significantly outperforming DeepSeek-R1, Qwen2, and Llama3. This confirms its ability to generate higher quality and appropriately long texts.
  1. Impact of Thinking Prompts:
  • "No thinking" model (Green): Showed improvement with RL training but reached an earlier and lower ceiling.
  • "Base model with thinking" (Orange): Initially performed poorly due to the need to learn the "think then write" format. However, once this behavior was learned, it showed significant improvements in writing quality and length control.
  • "Continue pretrain with thinking" (Blue): Started from a very high performance point and consistently remained the best overall. This demonstrates that a strong base model combined with explicit thinking instructions allows RL to leverage the "thinking then writing" advantage most efficiently.
  1. RL vs. SFT: A direct comparison revealed the superiority of RL. At RL training step 150, the reinforcement learning method already surpassed the performance of the SFT method. Furthermore, using a continually pretrained, strong base model (the "blue one") consistently yielded better results than SFT data, underscoring the limitations and expense of SFT for ultra-long generation.
  1. Reward Model Efficacy: The talk presented figures showing that the writing reward and lengths reward consistently increased with RL training, directly correlating with an increase in output lengths. This indicates that the sophisticated tripartite reward model effectively guided the learning process towards the desired outcomes.
  1. Thinking Length Analysis: The "thinking lengths" (internal planning tokens) were observed to increase with RL training. However, unlike DeepSeek-R1's extensive thinking for math, LongWriter-Zero's thinking length for writing tasks maxed out around 1,000 tokens. The speaker clarified that this length is sufficient for planning, brainstorming, and story building, but not for drafting the actual long text within the thinking stage, which was found to be counterproductive for final output quality.

These results collectively provide compelling evidence that LongWriter-Zero's RL-from-scratch approach, supported by a strong base model and a detailed reward system, is highly effective for mastering ultra-long text generation, setting a new benchmark for this challenging task.

Practical Implications

▶ Watch: Addressing hallucination using the writing reward model (Q&A) (8:00)

LongWriter-Zero presents several significant practical implications for practitioners, infrastructure teams, model builders, and deployers working with Large Language Models.

For Practitioners (e.g., content creators, researchers, storytellers):

  • Unlocks True Long-Form Assistance: The most direct implication is the ability to leverage LLMs for tasks that genuinely require ultra-long outputs, such as drafting research papers, writing entire stories or novels, generating comprehensive reports, or producing extensive code documentation. This moves beyond the current limitation where LLMs serve more as ideation tools or short-form assistants.
  • Higher Quality and Coherence: Users can expect generated text that is not only long but also maintains high fluency, coherence, and adherence to specific instructions over extended sequences. This reduces the need for extensive human editing to stitch together shorter segments or correct degraded quality.
  • Reduced Hallucination: The integration of human feedback into the Writing Reward Model directly penalizes hallucination. This means practitioners can rely more confidently on the factual consistency and relevance of generated long texts, especially crucial for academic or professional applications.

For Infrastructure Teams and Model Deployers:

  • RL-Centric Deployment: The success of LongWriter-Zero highlights that deploying advanced LLMs for specific, complex tasks might increasingly involve RL-trained models rather than purely SFT models. This requires infrastructure capable of supporting RL training pipelines, including efficient handling of reward model inference during training.
  • Strong Base Models as Foundation: The importance of a continually pretrained, strong base model (like Qwen2 32B with 200B additional tokens) means that investment in foundational model development and sustained pretraining is critical for unlocking subsequent RL gains.
  • Test-Time Scaling Considerations: While beneficial, the specific nature of "thinking lengths" for writing (around 1,000 tokens for planning) suggests that inference systems need to efficiently support these internal monologue steps without excessive computational overhead, which could otherwise be a bottleneck for ultra-long generation.

For Model Builders and Researchers:

  • RL as a Superior Paradigm for Complex Tasks: LongWriter-Zero strongly advocates for RL from scratch as a more effective paradigm than SFT for complex, long-horizon generation tasks where simple next-token prediction is insufficient. This could shift research focus towards developing more sophisticated RL algorithms and reward modeling techniques.
  • Sophisticated Reward Systems: The tripartite reward model (lengths, writing quality, format) provides a blueprint for designing comprehensive feedback mechanisms for LLMs. This underscores the need for interdisciplinary efforts, combining machine learning expertise with domain-specific knowledge (e.g., linguistics for writing quality, or subject matter experts for factual correctness) to build effective reward models.
  • Efficient Human-in-the-Loop: The reliance on human feedback for the writing reward model implies that efficient human-in-the-loop annotation pipelines are crucial for developing high-performing RL models. Strategies for scaling and optimizing human labeling (e.g., pairwise comparisons, active learning) will be increasingly important.

Tradeoffs and Limitations:

  • Computational Cost: Training RL models from scratch, especially with continued pretraining on billions of tokens, is computationally intensive and requires significant GPU/TPU resources. This might limit its accessibility for smaller teams or those with constrained budgets.
  • Reward Model Complexity: Building and maintaining a sophisticated, multi-component reward model is complex. It requires careful design, data collection (human feedback), and continuous validation to ensure it accurately reflects desired behaviors and avoids unintended reward hacking.
  • Data for Reward Model: While the RL method avoids reliance on synthetic SFT data for the generation task itself, it still depends on human-labeled data for training the writing reward model. The quality and diversity of this human feedback are paramount.
  • Generalization vs. Specificity: While LongWriter-Zero shows strong performance on long-form writing, its specific reward model is tailored to this task. Adapting it to other complex, long-horizon tasks (e.g., scientific discovery, legal document generation) would require re-designing or fine-tuning the reward components.

In essence, LongWriter-Zero signals a future where LLMs are not just better at generating human-like text, but are truly capable of assisting in complex, multi-page creative and analytical endeavors, provided the underlying infrastructure and modeling strategies embrace the power and complexity of reinforcement learning.

Key Takeaways

  • Reinforcement Learning (RL) from scratch is crucial for ultra-long text generation, pushing beyond the token limits and quality degradation of traditional Supervised Fine-Tuning (SFT) methods.
  • A sophisticated, multi-component reward model is essential, encompassing explicit lengths control, human-feedback-driven writing quality assessment, and format adherence to guide the RL process effectively.
  • Starting with a strong, continually pretrained base model significantly enhances RL efficiency and performance, leading to superior results compared to models without this foundational pretraining.
  • Test-time scaling for internal "thinking" is beneficial for writing, primarily for planning and brainstorming (around 1,000 tokens), but differs from the very long thinking steps observed in math reasoning tasks.
  • LongWriter-Zero achieves state-of-the-art performance on ultra-long generation benchmarks, outperforming leading LLMs like DeepSeek-R1, Qwen2, and Llama3, as validated by both automated metrics and advanced LLM (GPT-4o) and human evaluations.
  • RL demonstrates clear superiority over SFT for this task, being more efficient and effective in achieving high-quality, long-horizon outputs, which has significant implications for future LLM development and deployment strategies.

About the Speaker(s)

The primary presenter for "LongWriter-Zero: Mastering Ultra-Long Text Generation via Reinforcement Learning" was Yuhao Wu. Yuhao presented the work as coming from the Singapore University of Technology and Design (SUTD) and Tsinghua University (THU). His research focuses on advancing the capabilities of Large Language Models, particularly in challenging areas like ultra-long text generation, by leveraging techniques such as reinforcement learning. He is joined by co-authors Yushi Bai, Zhiqiang Hu, Roy Ka-Wei Lee, and Juanzi Li, all contributing to this significant work.

Reviews

→ Top-rated talks at International Conference on Learning Representations 2026

All talks from International Conference on Learning Representations 2026