WhoBuilt

Text Diffusion

Jun 4, 2026· 28 min· 45K views·Watch on YouTube

Speaker

Brendan O’Donoghue, a research scientist at Google DeepMind, explains text diffusion at an AI Engineer event.

How text diffusion works

O’Donoghue describes training a model to remove corruption from text, then generating by refining a sequence initialized with noise. Unlike autoregressive generation, which predicts one token at a time, diffusion updates a block of tokens over multiple passes. Gemini Diffusion was a research preview tested by about 100,000 people, with quality similar to Gemini 2.0 Flash in the reported comparisons and lower latency.

Latency and serving trade-offs

Diffusion can generate more tokens per second by making better use of GPU and TPU compute, and its bidirectional attention lets it consider future tokens. For example, 24 refinement passes could generate 256 tokens, reducing memory transfers compared with generating each token separately. But repeated passes can lower throughput for large batches and raise serving costs, even when individual responses are faster.

Self-correction and adaptive computation

In a math example, Gemini Diffusion initially proposed 60, then 49, before completing its reasoning and correcting the answer to 39. O’Donoghue says additional denoising steps can improve quality, while adaptive computation lets the model spend different amounts of time on different tasks. The demo used four steps for the first 100 digits of pi, 18 for FizzBuzz, and 31 for a paragraph explaining quantum mechanics.

Editing and fast interactive demos

Because the model can attend to tokens across a sequence, it can edit text in place, such as fixing code, adding documentation, or inserting a paragraph into a story. O’Donoghue also showed low-latency demos that generated interactive Wikipedia-like pages, Reddit-style pages, and an operating system as users clicked. In a voice-coding demo, a user created and modified a to-do app in about 15 seconds.

Deployment choices and open questions

In the Q&A, O’Donoghue said text diffusion can use the same data as autoregressive models, and that answer length can be handled with a fixed window or a length-prediction head. He described low-latency models as useful for on-device settings such as phones and robotics, where large-batch serving is less relevant. For server-side services, throughput remains a key constraint; he said reinforcement learning and combinations with autoregressive models are possible.

Takeaways

  • Compare generation methods on both response latency and batch throughput; faster individual responses can cost more to serve.
  • For interactive or on-device products, low latency may matter more than maximizing server-side batch throughput.
  • Use iterative refinement when a task benefits from revising earlier output in light of later context.
  • An adaptive compute budget can give simple requests fewer passes and harder requests more time.
  • Text diffusion can support targeted edits, such as repairing code or filling in a missing passage.

Mentioned in this talk

Search inside this talk

What was claimed 7

Related talks