Repository navigation
[Bugfix][RL] Load MiMo-V2 attention sink bias through weight_loader - #57804
Ronald1995 wants to merge 2 commits into
Conversation
|
Documentation preview: https://vllm--57804.org.readthedocs.build/en/57804/ |
334846f to
41b7064
Compare
Checkpoint-backed attention sink parameters are loaded with a bare copy_ in
several model load_weights implementations:
param.data.copy_(narrow_weight)
params_dict[name][:n].copy_(narrow_weight)
That write bypasses param.weight_loader, which is the only entry point the
online weight reload path can observe. During RL / online weight update /
layerwise reload the parameter is on meta, so the write lands on the parameter
instance the reload materialized and the framework has no record that the sink
was loaded. Measured through a real layerwise reload cycle, the restored kernel
tensor then holds unwritten storage rather than the new value, and the -inf
padding tail is not re-established either.
Add a design doc specifying the contract (every checkpoint-backed,
online-updatable parameter loads through the parameter's current
weight_loader), the measured failure mode, the 20 confirmed sites across 19
files, the shared padded-sink helper for DeepSeek, and the staged
implementation plan.
Implementation PRs: vllm-project#57797, vllm-project#57798, vllm-project#57799, vllm-project#57800, vllm-project#57801, vllm-project#57803, vllm-project#57804,
vllm-project#57805, vllm-project#57806.
Co-authored-by: AI Assistant <noreply@example.com>
41b7064 to
d41cfce
Compare
d14853b to
f9274f9
Compare
f9274f9 to
49e041b
Compare
Signed-off-by: Ronald1995 <ronaldautomobile@163.com>
49e041b to
a5ab888
Compare
The MiMo-V2 target model wrote its head-parallel attention sink bias with a bare copy_ after slicing the checkpoint tensor by TP rank, so the load was invisible to layerwise reload and a live update never reached the kernel tensor. The rank slice is now passed to the parameter's current loader, matching what mimo_v2_mtp already does. The sink branch keeps its own narrow-and-load body and continues, so the generic remap path below it is unchanged for every other weight. Signed-off-by: Ronald1995 <ronaldautomobile@163.com>
Verification on H20Verified commit: Environment
Results
The GPU script drives a real layerwise reload ( Pre-commitNo hook rewrote a file. Not verified
What changed in this revisionThe earlier revision reindented the whole tail of |
Fix the MiMo-V2 target model's attention sink bias load.
load_weightsslices the checkpoint tensor for the local TP rank, then uses the same current parameter loader path as other weights.The MTP model already follows this contract and is unchanged. This PR changes only
mimo_v2.py.Validation
ruff check,ruff format --check, andgit diff --checkpass.The integrated static audit finds no direct checkpoint sink copy. The new runtime tests have not been executed, as requested.
AI assistance
AI assistance was used.