Inference & Generation
DantinoX provides generation interfaces for all three paradigms, dispatched
through one Generator class. Generator.stream() auto-routes to KV-cache
decoding for AR checkpoints, fast_dllm_generate (or the simple MDLM
sampler) for discrete diffusion, and Euler ODE/SDE integration
(flow_generate) for continuous flow-matching — based on the
ModelConfig.paradigm field saved in the checkpoint.
Paradigm Overview
AR |
Discrete Diffusion |
Continuous Flow-Matching |
|
|---|---|---|---|
Entry point |
|
|
|
Decoding |
Token-by-token (left→right) |
Block-wise denoising |
Euler ODE / SDE integration |
Streaming |
✓ |
✓ |
✓ |
Infilling / conditioning |
Requires re-prompting |
Native |
Not yet supported (unconditional only) |
Cache |
Static KV-cache |
DualCache (prefix + suffix KV) |
None — no discrete state to cache |
Latency @ BS=1 |
Low |
Medium |
Medium–high (scales with |
Throughput @ large BS |
Medium |
High |
High |
Pages in this Section
Page |
Description |
|---|---|
KV-cache, streaming, sampling strategies (top-p, top-k, temperature) |
|
Simple MDLM sampler, Fast-dLLM DualCache, infilling |
|
Euler ODE/SDE sampling, Classifier-Free Guidance, |
|
Static pre-allocation, MHA vs. GQA vs. MLA memory profiles |