Skip to content

Commit ce08df5

Browse files
committed
Update docstring
1 parent 10b5b0e commit ce08df5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

vllm/model_executor/models/utils.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ def apply(self, key: str) -> Optional[str]:
5757

5858
class AutoWeightsLoader:
5959
"""
60-
Helper class to load weights into a :class:`torch.nn.Module`.
60+
Helper class to load weights into a :class:`torch.nn.Module`. It is able
61+
to automatically detect child modules and parameters while iterating over
62+
the weights only once.
6163
6264
The weight loading logic for individual modules can be overridden
6365
by defining a ``load_weights`` method.
@@ -144,7 +146,8 @@ def _groupby_prefix(
144146
key=lambda x: x[0][0]):
145147
yield (
146148
prefix,
147-
# Because maxsplit=1, the length of `rest` can either be 0 or 1
149+
# Because maxsplit=1 in weight_name.split(...),
150+
# the length of `rest` must either be 0 or 1
148151
(("" if len(rest) == 0 else rest[0], weights_data)
149152
for (_, *rest), weights_data in group),
150153
)

0 commit comments

Comments
 (0)