Update Wall-X to 1.1.0 (#104)

This commit is contained in:
Starrick Liu
2026-06-15 11:40:00 +08:00
committed by GitHub
parent e23a586846
commit 72834e7de5
200 changed files with 33916 additions and 16771 deletions
@@ -0,0 +1,16 @@
import torch.nn as nn
from .utils import get_dmuon_optimizer
def is_dmuon_model(model: nn.Module) -> bool:
"""True if ``dmuon.dedicate_params()`` has been applied to this model.
Checked via an attribute the external ``dmuon`` package attaches to
the root module, so this predicate works without importing ``dmuon``
and returns ``False`` for ordinary (non-DMuon) models.
"""
return hasattr(model, "_dedicated_comm_ctx")
__all__ = ["get_dmuon_optimizer", "is_dmuon_model"]