{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/diffusion-forcing-next-token-prediction-meets","title":"Diffusion Forcing: Next-token Prediction Meets Full-Sequence Diffusion","arxiv_id":"2407.01392","date":"2024-07-01","proceeding":null,"authors":["Boyuan Chen","Diego Marti Monso","Yilun Du","Max Simchowitz","Russ Tedrake","Vincent Sitzmann"],"abstract":"This paper presents Diffusion Forcing, a new training paradigm where a diffusion model is trained to denoise a set of tokens with independent per-token noise levels. We apply Diffusion Forcing to sequence generative modeling by training a causal next-token prediction model to generate one or several future tokens without fully diffusing past ones. Our approach is shown to combine the strengths of next-token prediction models, such as variable-length generation, with the strengths of full-sequence diffusion models, such as the ability to guide sampling to desirable trajectories. Our method offers a range of additional capabilities, such as (1) rolling-out sequences of continuous tokens, such as video, with lengths past the training horizon, where baselines diverge and (2) new sampling and guiding schemes that uniquely profit from Diffusion Forcing's variable-horizon and causal architecture, and which lead to marked performance gains in decision-making and planning tasks. In addition to its empirical success, our method is proven to optimize a variational lower bound on the likelihoods of all subsequences of tokens drawn from the true joint distribution. Project website: https://boyuan.space/diffusion-forcing","url_abs":"https://arxiv.org/abs/2407.01392v4","url_pdf":"https://arxiv.org/pdf/2407.01392v4.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"diffusion-forcing-next-token-prediction-meets","repo_url":"https://github.com/buoyancy99/diffusion-forcing","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"diffusion-forcing-next-token-prediction-meets","repo_url":"https://github.com/leffff/diffusion-forcing","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"diffusion-forcing-next-token-prediction-meets","repo_url":"https://github.com/skyworkai/skyreels-v2","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}}],"tasks":[{"task_slug":"decision-making","task_name":"Decision Making"},{"task_slug":"prediction","task_name":"Prediction"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"},{"method_slug":"set","method_name":"SET"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2407.01392","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2407.01392"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/skyworkai/skyreels-v2","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/buoyancy99/diffusion-forcing","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/leffff/diffusion-forcing","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_violates":2,"ran":2,"ran_draft_wrong":1},"by_repo_kind":{"official":{"samples":5,"ran":5,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"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"},"n_pointer_only_for_licence":5,"samples":[{"code_sha256_prefix":"915fbeb88e13d4a3","entry":"default","repo":"buoyancy99/diffusion-forcing","repo_kind":"official","path":"algorithms/diffusion_forcing/models/utils.py","file_url":"https://github.com/buoyancy99/diffusion-forcing/blob/HEAD/algorithms/diffusion_forcing/models/utils.py","link_basis":"plan_row","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"915fbeb88e13d4a3"}},{"code_sha256_prefix":"aa5486a3650902d8","entry":"exists","repo":"buoyancy99/diffusion-forcing","repo_kind":"official","path":"algorithms/diffusion_forcing/models/utils.py","file_url":"https://github.com/buoyancy99/diffusion-forcing/blob/HEAD/algorithms/diffusion_forcing/models/utils.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"aa5486a3650902d8"}},{"code_sha256_prefix":"f45e6ade28d9233f","entry":"extract","repo":"buoyancy99/diffusion-forcing","repo_kind":"official","path":"algorithms/diffusion_forcing/models/utils.py","file_url":"https://github.com/buoyancy99/diffusion-forcing/blob/HEAD/algorithms/diffusion_forcing/models/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"f45e6ade28d9233f"}},{"code_sha256_prefix":"d2ab2ee4d21e2ed0","entry":"get_timestep_embedding","repo":"buoyancy99/diffusion-forcing","repo_kind":"official","path":"algorithms/diffusion_forcing/models/embeddings.py","file_url":"https://github.com/buoyancy99/diffusion-forcing/blob/HEAD/algorithms/diffusion_forcing/models/embeddings.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"d2ab2ee4d21e2ed0"}},{"code_sha256_prefix":"52e10a7d6b0fa036","entry":"once","repo":"buoyancy99/diffusion-forcing","repo_kind":"official","path":"algorithms/diffusion_forcing/models/attention.py","file_url":"https://github.com/buoyancy99/diffusion-forcing/blob/HEAD/algorithms/diffusion_forcing/models/attention.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"52e10a7d6b0fa036"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}