weight_mapping: strip language_model prefix to match HF text model names
This commit is contained in:
parent
6fb9735def
commit
2ecf4e21ff
1 changed files with 3 additions and 4 deletions
|
|
@ -48,10 +48,9 @@ def vllm_to_hf_views(vllm_params: dict[str, torch.Tensor]
|
|||
hf_params = {}
|
||||
|
||||
for name, tensor in vllm_params.items():
|
||||
# vLLM and HF both use 'language_model.model.layers...' for Qwen3.5.
|
||||
# HF checkpoint has 'model.' prefix but named_parameters() doesn't.
|
||||
# Keep vLLM's names as-is — we'll match when loading into the HF model.
|
||||
hf_name = name
|
||||
# vLLM uses 'language_model.model.layers...' but HF's text model
|
||||
# uses 'model.layers...'. Strip the 'language_model.' prefix.
|
||||
hf_name = name.removeprefix('language_model.')
|
||||
|
||||
# Split merged projections into HF-style separate weights
|
||||
if 'in_proj_qkvz' in name:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue