Skip to content

M6 · 14 h · skeleton

Serving and scale

Decode and diffusion both queue work onto a GPU. They do not share a cache design. Treating them as one system is a bug.

Prerequisite
Modules 0–3. Module 5 helps but is not required.
VRAM
KV cache, not weights, is what exhausts a long LLM decode. Video jobs exhaust activations.
Runtime
An overnight queue is part of the lab, not a failure.

What you must be able to show

  1. 01

    Name the batching unit (token, sequence, clip, or diffusion step) and show that pad tokens are not billed as work.

  2. 02

    Explain paged KV as a fix for fragmentation in decode, and say why a non-autoregressive DiT often has nothing to page.

  3. 03

    Write an admission rule with a memory budget so one oversized job cannot kill the queue behind it.

Insights

You are not building vLLM. You are writing a note that cannot be confused with a diffusion queue, plus a test that runs two jobs back to back without sharing a graph or a residual.

Paged attention exists because decode KV caches fragment. A finished request must return pages without a copy. A full-frame DiT recomputes Q, K and V every step; there is often no growing cache to page. Autoregressive video is the exception, and the exception has to be named. Speculative decoding is exact only while the rejection check stands.

  • Acceptance: the note names the batching unit. Pads are either skipped by the kernel or absent. A static pad to the longest sequence is a cost you measured or removed.
  • Acceptance: admission checks a byte budget. One 33B resident model plus a second copy is a refused job, not an OOM of the worker.
  • Acceptance: a resolution change is logged as a different contract. Silent 768p to 480p retries fail review.
  • Report seconds per clip at a stated shape, step count and warmup. Tokens per second is the wrong unit for a sampler.

Wrong conclusion. ‘We added paged attention to the video server.’ If the model is not autoregressive, say what you paged. If the answer is ‘nothing’, delete the paragraph.