diff --git a/vllm/model_executor/models/adapters.py b/vllm/model_executor/models/adapters.py index 23d72d8e60f6..6ab03c40ab4a 100644 --- a/vllm/model_executor/models/adapters.py +++ b/vllm/model_executor/models/adapters.py @@ -99,16 +99,17 @@ def load_weights(self, weights: Iterable[tuple[str, torch.Tensor]]): mapper = WeightsMapper(orig_to_new_prefix={"model.": ""}) weights = mapper.apply(weights) - self.model.load_weights(weights) - return + loaded_params = self.model.load_weights(weights) + loaded_params = {f"model.{name}" for name in loaded_params} + return loaded_params # For most other models if hasattr(orig_cls, "load_weights"): - orig_cls.load_weights(self, weights) # type: ignore + return orig_cls.load_weights(self, weights) # type: ignore # Fallback else: loader = AutoWeightsLoader(self) - loader.load_weights(weights) + return loader.load_weights(weights) return ModelForPooling # type: ignore