dLLM 추론과 서빙
이 경로는 dLLM을 이미지 생성 diffusion 모델로 다루지 않습니다. 여기서의 dLLM은 token sequence를 왼쪽에서 오른쪽으로 한 token씩 생성하지 않고, 고정 길이 canvas를 반복적으로 denoise하는 discrete diffusion language model입니다.
핵심 질문은 이것입니다.
vLLM 같은 serving engine이 autoregressive decoder-only LLM을 기본값으로 삼았다면,
dLLM은 그 기본 가정을 어디서 바꾸는가?
기존 LLM 추론 경로에서는 prefill/decode, KV cache, scheduler, speculative decoding을 token-by-token generation 중심으로 봤습니다.
dLLM에서는 생성 단위가 달라집니다.
autoregressive LLM:
다음 token 하나를 sample한다.
dLLM:
canvas 여러 위치를 반복 denoising하고,
commit step에서 token들을 확정한다.
그래서 dLLM은 SSM과 함께 이 프로젝트의 좋은 확장 주제입니다. 둘 다 Transformer serving의 숨은 가정을 드러냅니다. SSM은 “cache = past K/V”라는 가정을 흔들고, dLLM은 “generation = next token append”라는 가정을 흔듭니다.
이 path의 산출물은 DiffusionGemma 논문 요약이 아닙니다. 목표는 vLLM의 diffusion path를 읽을 때 다음 질문에 답하는 것입니다.
왜 DiffusionConfig에 canvas_length가 있는가?
왜 dLLM이 speculative decoding data path를 재사용하는가?
왜 denoising step에서는 sampled token이 없을 수 있는가?
왜 structured output이 diffusion path에서 어려운가?
- 추론 엔진의 세 층 — vLLM과 SGLang 같은 LLM 추론 엔진을 API, scheduler core, GPU worker로 나누어 이해한다.
- Prefill vs Decode — LLM 추론을 prompt 처리 구간과 token 생성 구간으로 나누고, 두 구간의 병목이 왜 다른지 이해한다.
- KV Cache — Decode에서 과거 token의 Key/Value를 저장해 재계산을 줄이고, 그 대가로 어떤 메모리 병목이 생기는지 이해한다.
- Discrete Diffusion LLM 직관 — dLLM을 token canvas를 반복적으로 denoise해 문장을 만드는 language model로 이해한다.
- Autoregressive vs Diffusion Decoding — next-token append 방식과 canvas denoising 방식이 serving loop를 어떻게 다르게 만드는지 비교한다.
- Token Canvas와 Denoising Step — dLLM에서 canvas_length, denoising step, commit step이 어떤 역할을 하는지 이해한다.
- DiffusionGemma Serving State — DiffusionGemma를 예로 dLLM serving이 request별 canvas, step counter, self-conditioning state를 관리해야 함을 이해한다.
- vLLM Diffusion Config와 Scheduler — vLLM의 DiffusionConfig가 canvas_length와 denoising step을 통해 scheduling 단위를 바꾸는 방식을 이해한다.
- dLLM Sampling과 Commit Step — dLLM에서 sampling은 매 step token append가 아니라 denoising 결과를 받아들이고 확정하는 과정임을 이해한다.
- dLLM과 Structured Output 제약 — dLLM의 parallel canvas denoising이 token-by-token 제약 decoding과 잘 맞지 않는 이유를 이해한다.
- dLLM과 SSM Serving 비교 — dLLM과 SSM이 각각 vLLM의 autoregressive Transformer serving 가정을 어떻게 다르게 흔드는지 비교한다.