LongLLaDA: Unlocking Long Context Capabilities in Diffusion LLMs

Xiaoran Liu, Yuerong Song, Zhigeng Liu, Zengfeng Huang, Qipeng Guo +2 more
6/17/2025
cs.CL

Official code: OpenMOSS/LongLLaDA (55 stars, last commit 2025-12-07).

Abstract

Large Language Diffusion Models, or diffusion LLMs, have emerged as a significant focus in NLP research, with substantial effort directed toward understanding their scalability and downstream task performance. However, their long-context capabilities remain unexplored, lacking systematic analysis or methods for context extension. In this work, we present the first systematic investigation comparing the long-context performance of diffusion LLMs and traditional auto-regressive LLMs. We first identify a unique characteristic of diffusion LLMs, unlike auto-regressive LLMs, they maintain remarkably stable perplexity during direct context extrapolation. Moreover, where auto-regressive models fail outright during the Needle-In-A-Haystack task with context exceeding their pretrained length, we discover diffusion LLMs exhibit a distinct local perception phenomenon, enabling successful retrieval from recent context segments. We explain both phenomena through the lens of Rotary Position Embedding (RoPE) scaling theory. Building on these observations, we propose LongLLaDA, a training-free method that integrates LLaDA with the NTK-based RoPE extrapolation. Our results validate that established extrapolation scaling laws remain effective for extending the context windows of diffusion LLMs. Furthermore, we identify long-context tasks where diffusion LLMs outperform auto-regressive LLMs and others where they fall short. Consequently, this study establishes the first length extrapolation method for diffusion LLMs while providing essential theoretical insights and empirical benchmarks critical for advancing future research on long-context diffusion LLMs. The code is available at https://github.com/OpenMOSS/LongLLaDA.

View on arXivView PDF

Code Implementations(1)

OpenMOSS/LongLLaDAOfficial100%

[AAAI26] LongLLaDA: Unlocking Long Context Capabilities in Diffusion LLMs

555PythonJun 20, 202510 months ago
diffusiondiffusion-language-modelslarge-language-modelslength-extrapolationlong-context

Similar Papers

Cite this paper

@article{liu2025longllada,
  title  = {LongLLaDA: Unlocking Long Context Capabilities in Diffusion LLMs},
  author = {Xiaoran Liu and Yuerong Song and Zhigeng Liu and Zengfeng Huang and Qipeng Guo and Ziwei He and Xipeng Qiu},
  year   = {2025},
  eprint = {2506.14429},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.14429v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2506.14429.svg)](https://codeofpaper.com/paper/2506.14429)

Discussion