Views
No views yet
🚀 Fast-dLLM v2 uses only ~1B tokens for fine-tuning — a 500× reduction vs. full-attention diffusion LLMs (Dream: 580B tokens) — while matching or surpassing AR baselines in accuracy.

Qwen/Qwen2.5-7B-Instructtransformers, torch, and our custom generation function:pip install transformers torch numpy1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_name = "Efficient-Large-Model/Fast_dLLM_7B"
4
5model = AutoModelForCausalLM.from_pretrained(
6 model_name,
7 torch_dtype="auto",
8 device_map="auto",
9 trust_remote_code=True
10)
11
12tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
13
14prompt = "Give me a short introduction to large language model."
15messages = [
16 {"role": "system", "content": "You are a helpful assistant."},
17 {"role": "user", "content": prompt}
18]
19
20text = tokenizer.apply_chat_template(
21 messages,
22 tokenize=False,
23 add_generation_prompt=True
24)
25inputs = tokenizer([text], return_tensors="pt").to(model.device)
26
27# Fast-dLLM v2 parallel decoding
28gen_ids = model.generate(
29 inputs["input_ids"],
30 tokenizer=tokenizer,
31 max_new_tokens=512,
32 small_block_size=8,
33 threshold=0.9,
34)
35
36response = tokenizer.decode(
37 gen_ids[0][inputs["input_ids"].shape[1]:],
38 skip_special_tokens=True
39)
40print(response)

1@misc{wu2025fastdllmv2efficientblockdiffusion,
2 title={Fast-dLLM v2: Efficient Block-Diffusion LLM},
3 author={Chengyue Wu and Hao Zhang and Shuchen Xue and Shizhe Diao and Yonggan Fu and Zhijian Liu and Pavlo Molchanov and Ping Luo and Song Han and Enze Xie},
4 year={2025},
5 eprint={2509.26328},
6 archivePrefix={arXiv},
7 primaryClass={cs.CL},
8 url={https://arxiv.org/abs/2509.26328},
9}