Skip to content

vllm.config.diffusion

Configuration for discrete diffusion (dLLM) models.

Classes:

  • DiffusionConfig

    Configuration for discrete diffusion language models (dLLMs).

DiffusionConfig

Configuration for discrete diffusion language models (dLLMs).

dLLMs generate tokens via iterative denoising over a fixed-length canvas rather than left-to-right autoregressive decoding. They reuse the speculative-decoding data path (draft token ids, scheduled spec decode tokens) with overloaded semantics for block-based generation.

Attributes:

Source code in vllm/config/diffusion.py
@config
class DiffusionConfig:
    """Configuration for discrete diffusion language models (dLLMs).

    dLLMs generate tokens via iterative denoising over a fixed-length canvas
    rather than left-to-right autoregressive decoding. They reuse the
    speculative-decoding data path (draft token ids, scheduled spec decode
    tokens) with overloaded semantics for block-based generation.
    """

    canvas_length: int = Field(default=None, gt=0)  # type: ignore[assignment]
    """Length of the denoising canvas (block).  Also determines the number of
    speculative tokens scheduled per step."""

    max_denoising_steps: int | None = None
    """Maximum number of denoising iterations per canvas block.
    If not set, read from the model's generation_config.json."""

canvas_length = Field(default=None, gt=0) class-attribute instance-attribute

Length of the denoising canvas (block). Also determines the number of speculative tokens scheduled per step.

max_denoising_steps = None class-attribute instance-attribute

Maximum number of denoising iterations per canvas block. If not set, read from the model's generation_config.json.