From 2ecf4e21fff133047b5df0385c23a34e35ad16ab Mon Sep 17 00:00:00 2001 From: ProofOfConcept Date: Mon, 30 Mar 2026 23:11:03 -0400 Subject: [PATCH] weight_mapping: strip language_model prefix to match HF text model names --- training/weight_mapping.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/training/weight_mapping.py b/training/weight_mapping.py index 1abad45..ae1a205 100644 --- a/training/weight_mapping.py +++ b/training/weight_mapping.py @@ -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: