Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions vllm/model_executor/models/adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down