Remove unnecessary load_weights methods (#44589)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
Harry Mellor
2026-06-29 01:52:23 -07:00
committed by GitHub
parent db28ae2d07
commit 5051698e41
54 changed files with 821 additions and 1975 deletions
@@ -576,7 +576,8 @@ class BitsAndBytesModelLoader(BaseModelLoader):
# For some models like Molmo, we need to use hf_to_vllm_mapper
# to ensure correct loading of weights.
if hf_to_vllm_mapper := getattr(model, "hf_to_vllm_mapper", None):
self.weight_mapper = lambda name: hf_to_vllm_mapper._map_name(name)
unstacked_mapper = hf_to_vllm_mapper.get_unstacked_mapper()
self.weight_mapper = lambda name, m=unstacked_mapper: m._map_name(name)
self._get_bnb_target_modules(model)
self._classify_module_sharding(model)