exp(weight-transfer): add sparse filesystem updates - #3386
Draft
samsja wants to merge 1 commit into
Draft
Conversation
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.
Summary
Experimental sparse filesystem policy publication for RL runs where most serving-precision weights remain unchanged.
base_step -> target_stepsparse chainConfigure it with:
Scope
This is a proof of concept. It currently requires trainer state-dict names and shapes to already match HF checkpoint coordinates. It rejects LoRA, checkpoint resume, and
PartialDTensors. It also requires the inference base checkpoint to match the trainer's initial sparse baseline.The inference worker retains a full BF16 HF state cache in CPU memory. Sparse publication reduces filesystem/network bytes, but vLLM still performs normal layerwise processing across the logical model.
A remaining correctness hardening item is commit-aware baseline promotion: local writer baselines currently advance when rank artifacts are written, before global publication acknowledgement.
Results
A Qwen3-0.6B two-GPU PrimeRL/vLLM smoke run completed through startup and multiple chained sparse reloads.
Observed update artifacts:
The dense model weights were about 2,273.78 MiB, making these artifacts about 13.4x and 15.8x smaller. The sparse format is not compressed yet.
Validation
uv run ruff check ...uv run ruff format --check ...uv run pytest -q tests/unit/train/test_sparse_update.py tests/unit/test_configs.py— 125 passeduv run pytest -q tests/unit/train -m 'not gpu'— 77 passed, 85 deselected[Replicate(), Shard(1)]DTensor reconstruction smoke test