Repository navigation
[RL][Sleep] Retain frozen weights across level-2 sleep - #57891
Merged
aoshen02 merged 11 commits intoSep 22, 2026
Merged
Conversation
Co-authored-by: Codex <noreply@openai.com> Signed-off-by: aoshen02 <aoshen02@users.noreply.github.com>
aoshen02
requested review from
22quinn,
ProExpertProg,
WoosukKwon,
houseroad,
mgoin,
njhill,
robertgshaw2-redhat,
tlrmchlsmth,
yewentao256 and
youkaichao
as code owners
September 21, 2026 07:14
Contributor
|
Documentation preview: https://vllm--57891.org.readthedocs.build/en/57891/ |
aoshen02
marked this pull request as draft
September 21, 2026 07:17
Co-authored-by: Codex <noreply@openai.com> Signed-off-by: aoshen02 <aoshen02@users.noreply.github.com>
Co-authored-by: Codex <noreply@openai.com> Signed-off-by: aoshen02 <aoshen02@users.noreply.github.com>
Co-authored-by: Codex <noreply@openai.com> Signed-off-by: aoshen02 <aoshen02@users.noreply.github.com>
aoshen02
force-pushed
the
infra-frozen-weight-offload
branch
from
September 21, 2026 10:53
234e6f0 to
d219c71
Compare
Co-authored-by: Codex <noreply@openai.com> Signed-off-by: aoshen02 <aoshen02@users.noreply.github.com>
Co-authored-by: Codex <noreply@openai.com> Signed-off-by: aoshen02 <aoshen02@users.noreply.github.com>
Co-authored-by: Codex <noreply@openai.com> Signed-off-by: aoshen02 <aoshen02@users.noreply.github.com>
Co-authored-by: Codex <noreply@openai.com> Signed-off-by: aoshen02 <aoshen02@users.noreply.github.com>
Co-authored-by: Codex <noreply@openai.com> Signed-off-by: aoshen02 <aoshen02@users.noreply.github.com>
aoshen02
marked this pull request as ready for review
September 22, 2026 02:00
Contributor
Author
|
/ci run |
|
✅ Triggered Buildkite CI #90329 for commit |
aoshen02
enabled auto-merge (squash)
September 22, 2026 02:01
Isotr0py
approved these changes
Sep 22, 2026
lesj0610
added a commit
to lesj0610/vllm
that referenced
this pull request
Sep 22, 2026
…bytes-profiling Only conflict is the import block in vllm/v1/worker/gpu_worker.py: vllm-project#57891 added `from fnmatch import filter as fnmatch_filter` at the same insertion point where this branch added `from functools import partial`. Both sides kept, order left to isort. Signed-off-by: lesj0610 <lesj0610@users.noreply.github.com>
twu3202
added a commit
to twu3202/vllm
that referenced
this pull request
Oct 7, 2026
vllm-project#57891 added Worker._sleep_saved_parameters, which wake_up reads; the test builds the worker by hand, so it has to set it too. Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Tianyao Wu <rayroy31@gmail.com>
This was referenced Oct 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Level-2 sleep discards weights, including frozen parameters omitted by the
trainer. Preserve selected parameters so they remain usable after wake-up
without retransmission.
sleep_preserve_parameter_names(CLI:--sleep-preserve-parameter-names) matches runtime parameter nameswith globs (default: empty; unmatched patterns raise). Selected GPU parameters
are backed up to pageable CPU memory and restored in place on weights wake-up;
CPU-resident parameters need no copy. Backups are released after restoration.
Level-1 behavior is unchanged. The option lives in
ModelConfigalongside theother sleep settings and does not require a weight-transfer engine.
Two private Worker methods keep selection and backup state within the sleep/wake lifecycle. XPU inherits the implementation; CPU workers do not support sleep. Selection
covers the target model only. The trainer must omit selected weights, and
reload/post-processing must preserve their values and storage. Budget host
memory for backups; this option does not filter updates.
Validation
Focused checks
in-place restoration, and backup release passed.
git diff --checkpassed.Real GPU sleep/wake
On an NVIDIA GB200 using the real CuMem sleep backend and a small Llama model:
lm_head.weight. All 16,384 bytes and its GPUdata_ptrremained exact after every wake, while a non-retained parameter waschanged each cycle.
reload restored all 180,864 bytes.
Commands run in the pinned serving container:
Both returned
PASS. After moving the option toModelConfig, the same GPUtests were rerun with
weight_transfer_config=None.The integration results below precede the configuration relocation; the GPU
sleep/wake regression above exercises the current implementation.
Default VERL update path
An eight-rank run exercised VERL's standard non-layerwise update path. The
trainer omitted four frozen weight/scale tensors per rank. Across all ranks,
32 CPU-resident tensors totaling 202,758,032,400 bytes retained their complete
SHA-256 digest,
data_ptr, shape, dtype, and device through level-2 sleep andtwo updates. All eight trainable shards changed after an optimizer step, and
the subsequent synchronization did not mutate trainer state.
Generation succeeded before and after the update. On the same 30-question
held-out math set, pre/post accuracy was 8/30; all eight non-truncated responses
were correct in both runs. This is integration evidence, not an isolated model
accuracy claim.
Cross-host TP8
A two-host NVIDIA GB200 test ran TP8 with four ranks per host and default
FULL_AND_PIECEWISECUDA Graphs. Across two real level-2 cycles, the same 32CPU-resident tensors retained complete SHA-256 digests and addresses both before
and after restoring the other weights. All three generations produced identical
token IDs. There was no OOM and no CUDA Graph invalidation or recapture during
reload.
XPU execution remains untested.
Duplicate checks
Reviewed #50079 and open sleep/retention PRs. This preserves selected parameters
across level-2 sleep; #55206 releases cached pinned memory and #49789 preserves
post-load runtime state.
AI assistance was used. Human review of the latest revision remains pending.