Scaling Diffusion Language Models via Adaptation from Autoregressive Models

Shansan Gong, Shivam Agarwal, Yizhe Zhang, Jiacheng Ye, Lin Zheng, Mukai Li, Chenxin An, Peilin Zhao, Wei Bi, Jiawei Han, Hao Peng, Lingpeng Kong

arXiv:2410.17891 · 2026-07-27 공개 · arXiv · PDF

diffusion-models in-context-learning language-modeling autoregressive-models pre-training text-generation llama model-adaptation

Abstract

Diffusion Language Models (DLMs) have emerged as a promising new paradigm for text generative modeling, potentially addressing limitations of autoregressive (AR) models. However, current DLMs have been studied at a smaller scale compared to their AR counterparts and lack fair comparison on language modeling benchmarks. Additionally, training diffusion models from scratch at scale remains challenging. Given the prevalence of open-source AR language models, we propose adapting these models to build text diffusion models. We demonstrate connections between AR and diffusion modeling objectives and introduce a simple continual pre-training approach for training diffusion models. Through systematic evaluation on language modeling, reasoning, and commonsense benchmarks, we show that we can convert AR models ranging from 127M to 7B parameters (GPT2 and LLaMA) into diffusion models DiffuGPT and DiffuLLaMA, using less than 200B tokens for training. Our experimental results reveal that these models outperform earlier DLMs and are competitive with their AR counterparts. We release a suite of DLMs (127M-355M-7B) capable of generating fluent text, performing in-context learning, filling in the middle without prompt re-ordering, and following instructions https://github.com/HKUNLP/DiffuLLaMA.

한국어 요약

한 줄 요약

GPT2와 LLaMA를 기반으로 확장된 DiffuGPT와 DiffuLLaMA는 200B 토큰 미만으로 훈련되어 기존 DLM을 능가하고 AR 모델과 경쟁한다.

핵심 기여도

핵심 아이디어

기존 DLM은 AR 모델 대비 규모가 작고 훈련이 어려운 문제가 있었다. 본 연구는 기존 오픈소스 AR 모델(GPT2, LLaMA)을 기반으로 DLM을 확장하는 새로운 접근법을 제안한다. AR 모델과 DLM의 목표 간 연결성을 분석하고, 주요 차이점인 **주의력 마스크**(attention mask)와 **시퀀스 예측 방식**을 해결하기 위해 **마스크 점진 해제**(attention mask annealing)와 **시프트 연산**(shift operation)을 도입했다. 이는 AR 모델의 인과 마스크(causal mask)를 DLM의 양방향 마스크로 전환하는 데 기여한다. 또한, **연속 확산**(continuous diffusion, CD)과 **이산 확산**(discrete diffusion, DD) 손실 함수 간의 차이를 분석하여, DD 손실이 AR 손실과 더 잘 정렬된다는 점을 밝혔다.

기술적 접근법

주요 결과

의의 및 한계

실용적 활용

DiffuLLaMA는 텍스트 생성, 인컨텍스트 학습, 코드 생성, 인필링 등 다양한 NLP 작업에 활용 가능하다. 특히, **중간 토큰 보완**(middle infilling)이나 **지시 없이 생성**(unconditional generation)이 필요한 시스템에서 AR 모델 대비 유연한 제어가 가능하다. 산업적으로는 **대화형 AI**, **코드 생성 도구**, **문서 자동 작성 시스템** 등에 적용 가능하며, 기존 AR 모델을 기반으로 확장할 수 있어 연구 및 개발 비용을 절감할 수 있다.