Skip to content

[Config] Nest model-specific diffusion options under DiffusionConfig.model_options - #2

Open
LucasWilkinson wants to merge 2 commits into
sajadn:nemotron-labs-diffusion-upstreamfrom
LucasWilkinson:lwilkinson/nemotron-model-specific-diffusion-config
Open

LucasWilkinson wants to merge 2 commits into
sajadn:nemotron-labs-diffusion-upstreamfrom
LucasWilkinson:lwilkinson/nemotron-model-specific-diffusion-config

Conversation

@LucasWilkinson

@LucasWilkinson LucasWilkinson commented Oct 13, 2026 •

Copy link
Copy Markdown

Suggestion for vllm-project#58387.

DiffusionConfig keeps only the options every diffusion model shares (canvas_length, max_denoising_steps), plus a documented model_options field. Model-specific options go under model_options, and each model's VerifyAndUpdateConfig hook validates them against its own options class:

  • NemotronDiffusionOptions: temperature, selection_policy, confidence_threshold, moved from DiffusionConfig.
  • DiffusionGemmaDiffusionOptions: t_min, t_max, entropy_bound, confidence_threshold, stability_threshold. These were previously read only from generation_config.json, which they now override.

DiffusionConfig parses and documents itself without a model, and each model rejects keys that belong to another model. Example:

--diffusion-config '{"model_options": {"selection_policy": "leftmost"}}'
# or
--diffusion-config.model_options.selection_policy leftmost

DiffusionGemma's hook now also backfills canvas_length when --diffusion-config omits it, as Nemotron's hook already does.

Tests:

  • pytest tests/models/language/generation/test_nemotron_dllm.py tests/test_sampling_params.py tests/v1/sample/test_diffusion_gemma_reads.py: 105 passed, 5 skipped.
  • pre-commit, including mypy: passed.
  • B300, nvidia/Nemotron-Labs-Diffusion-3B with model_options={"temperature": 0.0, "selection_policy": "leftmost"}: options parsed into NemotronDiffusionOptions; greedy output correct; {"t_min": 0.1} rejected. Run with TORCH_COMPILE_DISABLE=1 because of the B300 compile error noted in the review.
  • B300, google/diffusiongemma-26B-A4B-it with model_options={"stability_threshold": 2}: options parsed into DiffusionGemmaDiffusionOptions, canvas_length backfilled to 256, generation runs; {"temperature": 0.0} rejected.

AI assistance (Claude) was used to write this change.

🤖 Generated with Claude Code

LucasWilkinson and others added 2 commits October 13, 2026 03:56
Keep DiffusionConfig limited to options shared by all diffusion models.
Architectures declare the DiffusionConfig subclass that --diffusion-config
is parsed into through their VerifyAndUpdateConfig hook, so Nemotron-only
options are validated for Nemotron and rejected for other models.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Lucas Wilkinson <lwilkins@redhat.com>
DiffusionConfig parses and documents itself without a model. Model-specific
options live under model_options and are validated by each model's
VerifyAndUpdateConfig hook (NemotronDiffusionOptions,
DiffusionGemmaDiffusionOptions). DiffusionGemma options override the
generation_config.json values, and its hook now backfills canvas_length when
--diffusion-config omits it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Lucas Wilkinson <lwilkins@redhat.com>
@LucasWilkinson LucasWilkinson changed the title [Config] Move Nemotron diffusion options into a model-specific config [Config] Nest model-specific diffusion options under DiffusionConfig.model_options Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant