Reduce AutoWeightsLoader kwargs (#53106)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
Harry Mellor
2026-08-20 15:40:11 +00:00
committed by GitHub
parent 2dd17225c6
commit 1fe3a1571a
84 changed files with 577 additions and 568 deletions
+13 -10
View File
@@ -1693,13 +1693,16 @@ class Gemma4ForCausalLM(
yield name, weight
# Skip multimodal weights — handled by the multimodal wrapper.
skip = [
"audio_tower.",
"vision_tower.",
"embed_audio.",
"embed_vision.",
]
loader = AutoWeightsLoader(self, skip_substrs=skip)
return loader.load_weights(_weight_iterator())
# Drop multimodal weights, which are handled by the multimodal wrapper.
# `_weight_iterator` already applies this model's renames by hand, so
# `hf_to_vllm_mapper` is deliberately not passed here.
mapper = WeightsMapper(
orig_to_new_substr={
"audio_tower.": None,
"vision_tower.": None,
"embed_audio.": None,
"embed_vision.": None,
}
)
loader = AutoWeightsLoader(self)
return loader.load_weights(_weight_iterator(), mapper=mapper)