[Model] Prime DLO cache retention with a startup warmup

Models whose request geometry opts out of the generic dummy run (H3: t2va
needs an explicit aspect ratio and a bounded duration) can declare a
dlo_dummy_run_recipe. Under distributed layerwise offload the engine's
startup warmup runs it, so the learned cache-retention budget is primed
before real traffic instead of on the first request.

H3 declares a maximum-duration t2va generation: duration is the only
workload variable at the fixed 768 short edge, so the learned peak
dominates every production request and no real request re-learns. Validated
on L20X: all cold-start releases happen during the startup warmup, zero
during requests; first request 15.91 s vs 16.7 s unwarmed, steady 14.9 s;
startup gains one max-length generation (~10-20 s). Non-DLO deployments
keep the opted-out generic warmup unchanged.

Signed-off-by: hsliuustc0106 <liuhongsheng4@huawei.com>
This commit is contained in:
hsliuustc0106 committed 2026-08-26 15:06:08 +08:00
1 parent c9bb65902e
commit f4394f1d3d
6 files changed
+201 -3

No files matched your search

+16
View File
@@ -4,6 +4,7 @@
from __future__ import annotations
import inspect
from typing import Any
from vllm_omni.diffusion.data import OmniDiffusionConfig
from vllm_omni.diffusion.model_metadata import get_diffusion_model_metadata
@@ -54,6 +55,21 @@ def get_dummy_run_num_frames(model_class_name: str, supports_audio_input: bool)
return 2 if supports_audio_input or supports_audio_output(model_class_name) else 1
def get_dlo_dummy_run_recipe(model_class_name: str) -> dict[str, Any] | None:
"""Get the model-declared DLO startup-warmup recipe, or None.
Models that opt out of the generic dummy run (``dummy_run_num_frames = 0``)
because their request geometry needs model-specific sampling arguments can
still declare a recipe used only when distributed layerwise offload is
enabled, where one startup generation primes the component allocator-cache
retention policy.
"""
model_cls = DiffusionModelRegistry._try_load_model_cls(model_class_name)
recipe = getattr(model_cls, "dlo_dummy_run_recipe", None) if model_cls is not None else None
return dict(recipe) if recipe else None
def get_dummy_run_num_image_inputs(model_class_name: str) -> int:
"""Return the maximum advertised image-input count for profiling."""