@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 6c5872efc5
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

[Bugfix] Unset HF's default max_new_tokens for DiffusionGemma (#45417)

Signed-off-by: Martin Kukla <martin.kukla@cantab.net>

Martin Kukla committed Jun 15, 2026 at 10:31 UTC 6c5872efc5fca7a53f5f3aa589e8cb7896d98618
1 file changed +14
vllm/model_executor/models/config.py
+14
@@ -158,6 +158,20 @@ class DiffusionGemmaModelForBlockDiffusionConfig(VerifyAndUpdateConfig):
158 if sc is not None and sc.max_num_seqs >= SchedulerConfig.DEFAULT_MAX_NUM_SEQS:
159 sc.max_num_seqs = 8
160
161 + # Remove the model's generation_config.json cap on max_new_tokens
162 + # (256) so DiffusionGemma behaves like every other model: no
163 + # server-wide limit, each request controls its own output length
164 + # via max_tokens. Setting to None causes get_diff_sampling_param
165 + # to skip this key entirely.
166 + model_config = vllm_config.model_config
167 + if "max_new_tokens" not in model_config.override_generation_config:
168 + model_config.override_generation_config["max_new_tokens"] = None
169 + logger.info(
170 + "DiffusionGemma: removing server-wide max_new_tokens cap "
171 + "from generation_config.json (use "
172 + "--override-generation-config to set a custom limit).",
173 + )
174 +
175
176 class DeepseekV4ForCausalLMConfig(VerifyAndUpdateConfig):
177 @staticmethod