[Sleep] Retain draft-private weights with existing parameter selector (#61046)

Signed-off-by: aoshen02 <aoshen@inferact.ai>
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
aoshen02
2026-10-11 23:30:56 +08:00
committed by GitHub
co-authored by Codex
parent 3e8e1364ff
commit 239a3fa3a8
4 changed files with 97 additions and 6 deletions
+3
View File
@@ -372,6 +372,9 @@ class ModelConfig:
hip platforms are supported)."""
sleep_preserve_parameter_names: list[str] = field(default_factory=list)
"""Parameter-name globs to preserve across level-2 sleep.
Use target globs for frozen Engram table weights and scales omitted by the
trainer (e.g. ``*.engram.embed_tokens.weight*``).
Use ``draft.<name>`` for draft-private parameters, or ``draft.*`` for all.
The sender must omit these parameters; loaders must preserve their storage."""
sleep_mode_backend: str = "cumem"
"""Mechanism used to free and restore GPU state for sleep mode. ``"cumem"``