Skip to content

Commit 13ee1da

Browse files
committed
Update modeling_utils.py
1 parent 7aed8eb commit 13ee1da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/transformers/modeling_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2478,7 +2478,7 @@ def initialize_weights(self):
24782478
This is equivalent to calling `self.apply(self._initialize_weights)`, but correctly handles composite models.
24792479
This function dynamically dispatches the correct `init_weights` function to the modules as we advance in the
24802480
module graph along the recursion. It can handle an arbitrary number of sub-models. Without it, every composite
2481-
model would have to recurse a second time on all sub-models explicitly on the outer-most `_init_weights`, which
2481+
model would have to recurse a second time on all sub-models explicitly in the outer-most `_init_weights`, which
24822482
is extremely error prone and inefficient.
24832483
24842484
Note that the `torch.no_grad()` decorator is very important as well, as most of our `_init_weights` do not use

0 commit comments

Comments
 (0)