Papers › Transfusion: Predict the Next Token and Diffuse Images with One Multi-Modal Model

Transfusion: Predict the Next Token and Diffuse Images with One Multi-Modal Model

20 Aug 2024arXiv:2408.11039archive 2025-07-28

Chunting Zhou, Lili Yu, Arun Babu, Kushal Tirumala, Michihiro Yasunaga, Leonid Shamis, Jacob Kahn, Xuezhe Ma, Luke Zettlemoyer, Omer Levy

We introduce Transfusion, a recipe for training a multi-modal model over discrete and continuous data. Transfusion combines the language modeling loss function (next token prediction) with diffusion to train a single transformer over mixed-modality sequences. We pretrain multiple Transfusion models up to 7B parameters from scratch on a mixture of text and image data, establishing scaling laws with respect to a variety of uni- and cross-modal benchmarks. Our experiments show that Transfusion scales significantly better than quantizing images and training a language model over discrete image tokens. By introducing modality-specific encoding and decoding layers, we can further improve the performance of Transfusion models, and even compress each image to just 16 patches. We further demonstrate that scaling our Transfusion recipe to 7B parameters and 2T multi-modal tokens produces a model that can generate images and text on a par with similar scale diffusion models and language models, reaping the benefits of both worlds.

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="2408.11039")

Code

Syntology Ran 6 of 11 code samples harvested from 2 repositories linked to this paper; 5 have no recorded run. Of those that ran: 2 ran · honoured contract; 3 ran · violated contract; 1 ran · our draft was wrong.

By repository: community (archive-listed): 11 samples from 2 repositories, 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.

VachanVY/Transfusion.torch mentioned on GitHubpytorchMIT report
haonan3/anchorcontext mentioned on GitHubpytorch report
lucidrains/transfusion-pytorch mentioned on GitHubjaxMIT 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

11 samples harvested; 6 ran; 2 honoured the contract we drafted; 5 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.

2ran · honoured contract
3ran · violated contract
1ran · our draft was wrong
5unverified

Licence: 0 of the 11 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 2 repositories linked to this paper, official or community; each sample names its own and says which. “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.

decode_token lucidrains/transfusion-pytorch/train_latent_with_text.py community (archive-listed) ran · our draft was wrong fingerprinted MIT (permissive) · 068b17b5ae41f738 · report
default lucidrains/transfusion-pytorch/transfusion_pytorch/modality_processing.py community (archive-listed) ran · violated contract fingerprinted MIT (permissive) · 99b3563ebc6734ad · report
divisible_by lucidrains/transfusion-pytorch/train_image_only_with_unet.py community (archive-listed) ran · violated contract fingerprinted MIT (permissive) · f912c209e9c899ca · report
exists lucidrains/transfusion-pytorch/transfusion_pytorch/modality_processing.py community (archive-listed) ran · violated contract fingerprinted MIT (permissive) · b7c3487f192e31b7 · report
identity lucidrains/transfusion-pytorch/transfusion_pytorch/transfusion.py community (archive-listed) ran · honoured contract fingerprinted MIT (permissive) · f3232418205f7cbd · report
precompute_freqs_cis VachanVY/Transfusion.torch/src/llama2c.py community (archive-listed) ran · honoured contract fingerprinted MIT (permissive) · 5f447bdd807ed3c0 · report
apply_rotary_emb VachanVY/Transfusion.torch/src/llama2c.py community (archive-listed) unverified MIT (permissive) · 30c8848624ea177f · report
collate_fn lucidrains/transfusion-pytorch/train_mnist_with_unet.py community (archive-listed) unverified MIT (permissive) · 6e69bb84d453db1c · report
decode_tokens lucidrains/transfusion-pytorch/train_latent_with_text.py community (archive-listed) unverified MIT (permissive) · 3eec335aee307a93 · report
join lucidrains/transfusion-pytorch/transfusion_pytorch/modality_processing.py community (archive-listed) unverified MIT (permissive) · 4e7ceb7d53efde9d · report
reshape_for_broadcast VachanVY/Transfusion.torch/src/llama2c.py community (archive-listed) unverified MIT (permissive) · df8a5213d3db1630 · report

Tasks

Language 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