ELF – The First Diffusion Language Model from Kaiming He's Team
Executive Summary:
ELF (Embedded Language Flows) is the first continuous-diffusion language model from Kaiming He's team, overturning the logic of autoregressive text generation. It denoises entirely in continuous embed...
1. What Is ELF
ELF (Embedded Language Flows) is the first continuous-diffusion language model from Kaiming He's team, overturning the logic of autoregressive text generation. It denoises entirely in continuous embedding space and discretizes to tokens only at the final step, achieving high-quality generation with very low compute. With just 105M parameters and 45B training tokens, ELF reaches a generative perplexity of 24 on OpenWebText—using less than a tenth of the data of mainstream discrete diffusion models—while excelling at unconditional generation, machine translation, and summarization. It opens a new technical path for diffusion language modeling.
Technical positioning and domain: ELF belongs to diffusion language models, specifically the continuous-diffusion paradigm, contrasting with discrete diffusion (MDLM, Duo, etc.). Text generation runs in continuous vector space rather than direct discrete token operations, simplifying training and improving data efficiency across unconditional and conditional tasks (translation, summarization).
Development background: Led by Kaiming He (FAIR, MIT) and collaborators with deep diffusion experience (e.g., Masked Diffusion Transformer in vision). The goal is to fix slow autoregressive inference and data-hungry discrete diffusion. The bet is a “continuous all the way” route—denoise in continuous space like image diffusion for better quality and lower training cost.
Core value: ELF tackles three diffusion-LM pain points: huge data needs (500B+ tokens elsewhere), many sampling steps (1024 for good discrete results), and complex architectures (extra decoders). With 45B tokens (~10× less) and 32 steps (~32× fewer), it beats rivals on quality while sharing denoising and decoding in one network—no separate decoder training or error compounding. That makes high-quality generation feasible in low-resource settings.
Technical characteristics: Flow Matching with x-prediction defines rectified-flow trajectories in embedding space; self-conditioning and classifier-free guidance (CFG) improve quality without extra inference cost; a unified train/inference architecture switches denoise vs decode modes via binary mode tokens—avoiding latent-diffusion decoder complexity.
2. Key Features
Continuous-space text generation: Denoising runs in embedding space, not discrete token space. At t=1, a learnable unembedding layer maps continuous states to token logits—avoiding costly per-step vocabulary transitions while preserving semantic structure in continuous space.
Unconditional language modeling: From Gaussian noise through 32 denoising steps, ELF produces fluent, low-perplexity human-like text. On OpenWebText, 32 steps reach perplexity 24—better than MDLM at 1024 steps (~35) without distillation or acceleration tricks.
Conditional text tasks: Supports WMT14 EN–DE/EN–FR translation and XSum summarization. On WMT14 EN–DE, BLEU exceeds prior diffusion LMs (MDLM, Duo) and some autoregressive baselines (Transformer 6-6), showing conditional strength.
Unified train/inference architecture: Denoising and final decoding share weights; binary mode tokens switch denoise vs decode. Training learns both; inference flips to decode on the last step—no separate latent decoder.
Self-conditioning and CFG: Training-time CFG as conditional signal lets the model generate reasonably without conditions at inference—better quality with no added inference overhead.
Flow Matching + x-prediction: Rectified flow from noise to data; the network predicts clean embeddings (x-prediction) with MSE loss—more stable in high dimensions than score matching on language data—enabling efficient generation at 105M parameters.
3. How to Use
Environment: PyTorch on Linux or macOS, Python 3.8+, PyTorch 1.13+, Transformers, T5 tokenizer. NVIDIA GPU (V100/A100) recommended; ~2GB VRAM for 105M inference on consumer GPUs like RTX 3090.
Clone the repo:
git clone https://github.com/lillian039/ELF.git cd ELFIncludes training, eval, inference scripts, and checkpoints.
Data preprocessing: Map text to continuous embeddings via T5 encoder (bidirectional contextual embeddings). Tokenize with T5, encode, save
.ptfiles (e.g., OpenWebText). Encoder used at train time only.Training:
python train.py --config configs/elf_105m.yaml --data_path /path/to/embeddingsMSE or CE loss; MSE recommended for stability. Mode tokens switch denoise/encode tasks during training.
Generation: Start from Gaussian noise, 32 denoising steps, decode on last step:
python generate.py --model_path /path/to/checkpoint --steps 32 --cfg_scale 1.0Tune steps (16–1024) and CFG scale (0.5–2.0) for quality vs diversity.
Downstream fine-tuning: Fine-tune on WMT14, XSum, etc. with conditional denoising loss:
python finetune.py --config configs/finetune_wmt14.yaml --data_path /path/to/wmt14No separate decoder needed after fine-tuning.
4. Pros and Cons
| Pros |
|---|
| Extreme data efficiency: 45B tokens beats discrete diffusion models trained on 500B+—~10× lower training cost for budget-limited labs. |
| Very few sampling steps: 32 steps match or beat rivals at 1024 steps—30×+ faster inference for near-real-time generation. |
| Simple unified architecture: Shared denoise/decode network—no extra decoder module or latent-decoder error buildup. |
| Novel continuous route: First strong evidence for “continuous all the way” text generation—important reference for non-AR research. |
5. Comparison with Similar Tools
| Dimension | ELF | MDLM | LLaDA |
|---|---|---|---|
| Approach | Continuous diffusion; discretize at end | Discrete diffusion in token space | Masked discrete diffusion (BERT-like) |
| Params | 105M | 350M / 1.3B | 8B |
| Training data | 45B tokens | 500B+ | Trillions |
| Sampling steps | 32 | 1024 (standard) / 64 (distilled) | 64–128 |
| OpenWebText perplexity | 24 @ 32 steps | ~35 @ 1024 / ~60 @ 32 | ~30 @ 128 |
| Architecture | Shared denoise/decode | Discrete vocab transitions each step | Masked Transformer |
| Strengths | Data/sample efficiency, simple stack | Discrete-native intuition | Scale and expressivity |
| Weaknesses | Encoder prep, limited size | Data-hungry, step-sensitive | Heavy train/infer cost |
Selection advice: Data-limited teams wanting fast deployment should pick ELF—train/infer on a single GPU. MDLM needs 500B+ tokens and 1024 steps—enterprise-scale resources. LLaDA is hard to reproduce at 8B/trillion-token scale. For max quality in creative writing or chat, autoregressive models still lead; ELF wins on parallel generation and long-sequence potential as it scales.
6. Editor's Review
ELF is a turning point for diffusion language models. Kaiming He's team shows continuous diffusion can work for text—counterintuitive given discrete language—by mapping through T5 embeddings plus Flow Matching and x-prediction. That design choice is as consequential as BERT was for pretraining.
Practically, 45B-token training democratizes replication vs trillion-token arms races—a “small but mighty” path for academia and SMBs.
Still early: 105M limits hard tasks; quality trails mature AR; T5 preprocessing is overhead. Scaling toward 1B+ and multimodal/code domains will determine whether ELF challenges AR dominance.
Audience: NLP/diffusion researchers, non-AR explorers, low-resource industrial use (minority-language translation, vertical summarization). General text generation still favors AR for now.
— Innovation 5/5, utility 4/5, ecosystem 3/5, future potential 5/5. Strongly worth watching.
7. Use Cases
Low-resource text generation: Fine-tune on small proprietary corpora without massive data budgets.
Machine translation: WMT14-quality with parallel non-AR inference for real-time meetings and messaging.
Summarization and rewriting: Stable on XSum-style tasks with less repetition than long AR runs.
Creative writing and dialogue: Perplexity 24 with natural prose; CFG controls diversity for marketing, scripts, and chat prototypes.
Research baseline: Validates continuous diffusion for text—foundation for sampling, scaling, and multimodal extensions.
8. FAQ
Q: Core advantage vs GPT-2-style autoregressive models?
A: Parallel generation and data efficiency—32 steps for a full sequence vs token-by-token AR; strong quality at 45B training tokens.
Q: Generation quality vs autoregressive?
A: Better than discrete diffusion; slightly worse perplexity/ consistency than GPT-2 on long reasoning. May feel more “human” in creative settings.
Q: Chinese support?
A: Official checkpoints are English (OpenWebText). Architecture is language-agnostic—use mT5 encoder and Chinese fine-tuning data.
Q: Inference speed and CPU?
A: ~0.5–1s for 512 tokens on RTX 3090 (32 steps). CPU is 10–20s— not for realtime. Use T4-class GPU or better.
Q: Open training code and custom data?
A: MIT-licensed full training pipeline. Convert custom text to embeddings with T5; MSE loss recommended.
Q: Larger models coming?
A: Team is exploring 1B/8B scales; no public release date. Scaling should work but needs more compute and data.
9. Project Links
- GitHub: https://github.com/lillian039/ELF
- arXiv paper: https://arxiv.org/pdf/2605.10938
Related AI Model Articles

Hy Image3.5 preview – A High-Value Professional-Level Image Generation Model from Tencent HunYuan
Hy Image3.5 preview is a high-value professional-level image generation model launched by Tencent HunYuan, designed to address the complex needs of high-quality image generation, precise text renderin...

Qwen-Image-2.1 Review: How a 7B Lightweight Open-Source Model Balances Text-to-Image Generation, Image Editing, and Native Transparency Channels
Qwen-Image-2.1 is a new generation of open-source image generation model developed by the Qwen team at Alibaba. Despite having only 7B parameters in its visual generation component, it achieved a comp...

AuK – Tencent HunYuan's Open-Source Foundation Model for Speech Generation and Editing
AuK is an open-source foundation model for speech generation and editing developed by the Tencent HunYuan team, featuring 1.5 billion parameters and utilizing a flow-matching diffusion architecture in...
LLaDA-Image – A Unified Image Generation and Editing Model Open-Sourced by Ant Group
LLaDA-Image is a 6B parameter unified image generation and editing model open-sourced by the inclusionAI Lab at Ant Group. This model adopts an innovative training approach, first pre-training purely ...
© All Rights Reserved. Some content on this site is partially generated by AI with human review.
