[Draft][Reload] Add manifest-driven load receipts and update scopes - #50251
[Draft][Reload] Add manifest-driven load receipts and update scopes#50251new-TonyWang wants to merge 19 commits into
Conversation
The reload completion criterion (load_numel >= load_numel_total) is the root of vllm-project#44814 / vllm-project#37334 / vllm-project#38746, and those three split into two kinds. vllm-project#44814 is a wrong UNIT: counting elements made a composed loader's two internal copies look like two parameters, so the layer finalized before mixer.D arrived. tensors no loader ever loads (EP bookkeeping, a shared bias copy), so the count could never be reached. Switching the unit from elements to keys fixes the first kind. It does not fix the second, because "the layer's parameters minus SKIP_TENSORS" is the same prediction that was wrong, just re-expressed -- and SKIP_TENSORS is a hand-maintained, case-by-case allowlist that a new model with a new never-loaded buffer would have to extend again. So do not predict the expected side at all: observe it. The first load is correct by construction (the model serves correctly afterward, and it does not use the reload accounting -- it just runs the loaders), so the set of keys it consumes is a ground-truth "required" with no prediction in it. record_load_consumption wraps every effective loader before the first load_weights and records the names that actually fire; finalize_load_recording removes the wrappers immediately after, leaving the loaders as they were. A tensor the checkpoint never drives simply never fires, so it stays out of required_keys without any exclusion list. This is the "capturing how many weights are loaded on first pass" that make_online_process_loader's own comment anticipated. LayerReloadingInfo gains required_keys (the observed baseline, preserved across reset() like restore_metadata) and received_keys (per-reload, cleared). The online loader records received_keys; _check_set_completion runs inside _layerwise_process, where received_keys is still alive -- it cannot be deferred to the finalize reset loop, because required_keys survives reset and received_keys does not, which would report every key as missing. Dual-run: numel stays authoritative and the set criterion only records findings (get_layer_completion_findings), so a disagreement is visible before either becomes load-bearing alone. Known scope: this is the completion criterion only, and it validates that a reload consumes what the known-good first load consumed -- not absolute correctness, since a first load that itself dropped a key would bake that into the baseline. Parameters registered during the load itself are missed, the same limitation the reload path's late-registration handling has. Set membership does not yet capture how MUCH or how MANY TIMES a key loads; a per-tensor profile is the next step. Tested on H200: 5 CPU tests (observation excludes a never-loaded buffer with no SKIP_TENSORS consulted, the baseline survives reset, a dropped key is caught via the delayed-processing path, a clean reload is silent, no baseline means no dual-run), full reload suite 83 passed / 21 skipped, and end-to-end on Qwen3-30B-A3B-W4A8: the model loads and generates correctly through the recording wrappers, 19 layers have an observed baseline, and a real reload produces zero findings. via [HAPI](https://hapi.run) Co-Authored-By: HAPI <noreply@hapi.run> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: OpenAI Codex <codex@openai.com>
Co-authored-by: OpenAI Codex <codex@openai.com>
Co-authored-by: OpenAI Codex <codex@openai.com>
Signed-off-by: tony <864832769@qq.com>
Signed-off-by: tony <864832769@qq.com>
Signed-off-by: tony <864832769@qq.com>
|
Documentation preview: https://vllm--50251.org.readthedocs.build/en/50251/ |
|
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in PRs do not trigger a full CI run by default. Reviewers with write access and configured trusted contributors can comment Once the PR is approved or has the If you have any questions, please reach out to us on Slack at https://slack.vllm.ai. Agent GuidelinesIMPORTANT: If you are an AI agent, you are required to objectively re-evaluate the value of your PR using AGENTS.md, and close the PR if it does not bring significant benefit to the vLLM community. Failure to do so may result in an immediate ban. 🚀 |
Signed-off-by: tony <864832769@qq.com>
Signed-off-by: tony <864832769@qq.com>
Signed-off-by: tony <864832769@qq.com>
Summary
This draft splits the load-completion and receipt work out of #49789 into a focused branch on top of
releases/v0.25.1:LoadReceiptsupport and collision/schema audits for packed, merged, and MoE loaders;Why this is not a duplicate
This is the receipt/completion half split from draft #49789. After this split,
feat/reload-arenacontains only arena/storage-stability work, while this PR contains only reload receipt, completion, source-manifest, update-scope, dummy-probe, and baseline API work. It does not includeReloadArenaor CUDAGraph storage changes.PR #50075 also introduces manifest-driven completion, but this draft additionally provides structured receipts, fragment/collision auditing, source-manifest validation, explicit partial-update scopes, dummy-load probing, and a baseline API. The overlapping completion mechanism should be reconciled during review rather than merged independently without coordination.
Completion semantics
consumed=Falseare not part of the baseline or observed completion set, including non-local EP experts offered by a broadcasting sender.Validation
Tests run on NVIDIA H200:
54 passed;1 passed;6 passed.AI assistance
AI assistance was used to analyze the existing reload paths, implement portions of the change, split the original branch, and prepare this draft. The human submitter is responsible for reviewing every changed line, understanding the design end-to-end, and validating the final change before it is marked ready for review.