[Feature]: add Ulysses advanced_uaa mode (#1379)

Signed-off-by: dongbo910220 <1275604947@qq.com>
Signed-off-by: dongbo910220 <32610838+dongbo910220@users.noreply.github.com>
Co-authored-by: Didan Deng <33117903+wtomin@users.noreply.github.com>
This commit is contained in:
dongbo910220andDidan Deng authored and GitHub committed 2026-03-24 14:55:54 +08:00
1 parent 4cfa9bf843
commit 50bd1961bf
17 files changed
+1064 -13

No files matched your search

+17
View File
@@ -80,6 +80,23 @@ def is_forward_context_available() -> bool:
return _forward_context is not None
def get_ulysses_mode(*, default: str = "strict") -> str:
"""Resolve the Ulysses-SP mode from the current ForwardContext.
Returns `default` when ForwardContext is unavailable or the diffusion
config is not set.
"""
if not is_forward_context_available():
return default
cfg = get_forward_context().omni_diffusion_config
if cfg is None:
return default
parallel_config = cfg.parallel_config
return str(getattr(parallel_config, "ulysses_mode", default))
def create_forward_context(
vllm_config: VllmConfig | None = None,
omni_diffusion_config: OmniDiffusionConfig | None = None,