Repository navigation
[Bugfix][RL] Load HY-V4 learnable sinks through weight_loader - #57803
Ronald1995 wants to merge 2 commits into
Conversation
|
Documentation preview: https://vllm--57803.org.readthedocs.build/en/57803/ |
ad8ec0d to
346cae0
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>
ca0533b to
54b8c9d
Compare
54b8c9d to
a2cefdf
Compare
Signed-off-by: Ronald1995 <ronaldautomobile@163.com>
a2cefdf to
cb60c5a
Compare
HY-V4 checkpoint-backed learnable sinks were written with a bare copy_, so a live reload left the kernel tensor untouched. All three sites (AMD and NVIDIA target, NVIDIA MTP) now route the rank slice through the parameter's current loader via the shared load_padded_attn_sink helper, which is a no-op padding path here because the HY-V4 sink parameter already has the local head shape. The target sites also stop falling through into the general weight remapping code after a sink load, which re-checked a name that is not a checkpoint key there, and they now record the sink in loaded_params like 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 revision
|
Fix HY-V4 checkpoint-backed learnable sink loading in NVIDIA target/MTP and AMD target models. The AMD target path was omitted from the original series and is included here.
The runtime parameter already has local TP shape.
load_weightstakes the rank slice once and passes it to the parameter's currentweight_loader; no padded helper or second sharding loader is needed. The AMD and NVIDIA target paths preserve their TP slicing, load the local shard through the currentweight_loader, and use the same sharedloaded_paramspath.Validation
This PR changes only three HY-V4 files.
ruff check,ruff format --check, andgit diff --checkpass.Static validation on the integrated final tree:
ruff check,ruff format --check,git diff --check, and test tethering pass. The source audit passes 28 tests. The new runtime tests have not been executed, as requested.AI assistance
AI assistance was used.