Papers › Scaling Diffusion Language Models via Adaptation from Autoregressive Models

Scaling Diffusion Language Models via Adaptation from Autoregressive Models

23 Oct 2024arXiv:2410.17891archive 2025-07-28

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

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 (with 127M, 355M, and 7B parameters) capable of generating fluent text, performing in-context learning, filling in the middle without prompt re-ordering, and following instructions \url{https://github.com/HKUNLP/DiffuLLaMA}.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2410.17891")

Code

Syntology Ran 6 of 22 code samples harvested from 1 repository linked to this paper; 16 have no recorded run. Of those that ran: 1 ran · honoured contract; 3 ran · our draft was wrong; 1 ran · fixture could not drive it; 1 ran with no contract checked.

By repository: official repository: 22 samples from 1 repository, 6 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

hkunlp/diffullama officialmentioned in papermentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

22 samples harvested; 6 ran; 1 honoured the contract we drafted; 16 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
3ran · our draft was wrong
1ran · fixture could not drive it
1ran
16unverified

Licence: 22 of the 22 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from HKUNLP/DiffuLLaMA. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

repeat_kv HKUNLP/DiffuLLaMA/DiffuLLaMA-training/model_llama.py official repository ran · fixture could not drive it fingerprinted no licence file found · pointer only · 30d7eec482ebf6b1 · report
apply_rotary_pos_emb HKUNLP/DiffuLLaMA/DiffuLLaMA-training/model_llama.py official repository ran · our draft was wrong no licence file found · pointer only · bac65c3dafaec040 · report
code HKUNLP/DiffuLLaMA/DiffuLLaMA-training/packed_dataset.py official repository ran no licence file found · pointer only · fa298642043e1282 · report
maybe_get_set_global_memory_buffer HKUNLP/DiffuLLaMA/DiffuLLaMA-training/easy_context/dist_flash_attn/async_communication.py official repository ran · honoured contract fingerprinted no licence file found · pointer only · ce7333f42d88b05d · report
maybe_get_set_global_memory_buffer_bwd HKUNLP/DiffuLLaMA/DiffuLLaMA-training/easy_context/dist_flash_attn/async_communication.py official repository ran · our draft was wrong fingerprinted no licence file found · pointer only · ee03eab03d798c57 · report
rotate_half HKUNLP/DiffuLLaMA/DiffuLLaMA-training/model_llama.py official repository ran · our draft was wrong fingerprinted no licence file found · pointer only · b99eea6376d1e212 · report
checkpoint_end_with_flash_attention HKUNLP/DiffuLLaMA/DiffuLLaMA-training/easy_context/dist_flash_attn/monkey_patch.py official repository unverified no licence file found · pointer only · 59adcbbcc9bf1cbc · report
checkpoint_last_module HKUNLP/DiffuLLaMA/DiffuLLaMA-training/easy_context/dist_flash_attn/monkey_patch.py official repository unverified no licence file found · pointer only · 7517e14a19d34e0f · report
extract_local HKUNLP/DiffuLLaMA/DiffuLLaMA-training/easy_context/dist_flash_attn/prepare_input.py official repository unverified no licence file found · pointer only · 64ec6a16fb572f44 · report
extract_local HKUNLP/DiffuLLaMA/DiffuLLaMA-training/easy_context/ulysses_attn/prepare_inputs.py official repository unverified no licence file found · pointer only · 5e09c24645115dd9 · report
generate_samples HKUNLP/DiffuLLaMA/model.py official repository unverified no licence file found · pointer only · 2d05c810fd8d785d · report
get_anneal_attn_mask HKUNLP/DiffuLLaMA/evaluation/eval-diffullama.py official repository unverified no licence file found · pointer only · ee7bd71eac25f44d · report
get_flash_attn_out_from_global_buffer HKUNLP/DiffuLLaMA/DiffuLLaMA-training/easy_context/dist_flash_attn/monkey_patch.py official repository unverified no licence file found · pointer only · 89e4348b4cb177bd · report
is_last_time HKUNLP/DiffuLLaMA/DiffuLLaMA-training/easy_context/dist_flash_attn/async_communication.py official repository unverified no licence file found · pointer only · 4be6bef6c83e9c27 · report
maybe_repeat_kv_bwd HKUNLP/DiffuLLaMA/DiffuLLaMA-training/easy_context/dist_flash_attn/lightseq_async_attn.py official repository unverified no licence file found · pointer only · d7b82e7e46f9cee8 · report
maybe_repeat_kv_fwd HKUNLP/DiffuLLaMA/DiffuLLaMA-training/easy_context/dist_flash_attn/lightseq_async_attn.py official repository unverified no licence file found · pointer only · 3d82586ab3888495 · report
new_decoder_forward HKUNLP/DiffuLLaMA/DiffuLLaMA-training/easy_context/ulysses_attn/monkey_patch.py official repository unverified no licence file found · pointer only · 2fcefe3ddd3fa8eb · report
new_flash_attn_forward HKUNLP/DiffuLLaMA/DiffuLLaMA-training/easy_context/ulysses_attn/monkey_patch.py official repository unverified no licence file found · pointer only · 9949ec185b470d6e · report
prepare_dist_flash_attn_inputs HKUNLP/DiffuLLaMA/DiffuLLaMA-training/easy_context/dist_flash_attn/prepare_input.py official repository unverified no licence file found · pointer only · 9daba25cd657ac06 · report
prepare_ulysses_attn_inputs HKUNLP/DiffuLLaMA/DiffuLLaMA-training/easy_context/ulysses_attn/prepare_inputs.py official repository unverified no licence file found · pointer only · 737366305cfbf977 · report
preprocess HKUNLP/DiffuLLaMA/evaluation/eval-diffullama.py official repository unverified no licence file found · pointer only · dd2d39c8d8eff4d5 · report
top_p_logits HKUNLP/DiffuLLaMA/evaluation/eval-diffullama.py official repository unverified no licence file found · pointer only · fd2fe76b57111989 · report

Tasks

In-Context LearningLanguage ModelingLanguage Modelling

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Diffusion

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections