[edge-infer] Spark2_5: AutoWeightsLoader lost skip_prefixes in vLLM 0.29.0

The 0.29.0 loader de-duplicates tied parameters itself, so the explicit
lm_head. skip for tie_word_embeddings is no longer needed (and its keyword
no longer exists: engine init failed with TypeError on the first 0.29.0
parity run).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
tzhouamandClaude Fable 5.1 committed 2026-09-18 10:05:57 +08:00
1 parent 8dfc8156bc
commit 54a6787bde
1 file changed
+4 -4
@@ -505,10 +505,10 @@ class Spark2_5ForCausalLM(nn.Module, SupportsLoRA, SupportsPP):
return self.logits_processor(self.lm_head, hidden_states)
def load_weights(self, weights: Iterable[tuple[str, torch.Tensor]]) -> set[str]:
loader = AutoWeightsLoader(
self,
skip_prefixes=(["lm_head."] if self.config.tie_word_embeddings else None),
)
# vLLM 0.29.0 dropped AutoWeightsLoader's ``skip_prefixes``: the loader now
# detects tied parameters itself (``_get_tied_embedding_params``) and loads
# the first qualname only, so the tied ``lm_head.`` needs no explicit skip.
loader = AutoWeightsLoader(self)
return loader.load_weights(
_split_fused_qkv(weights, self.config), mapper=self.hf_to_vllm_mapper
)