Skip to content

Commit abf101a

Browse files
authored
Fix version issue in modeling_utils.py (#39759)
fix version issue
1 parent 8db4d79 commit abf101a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/transformers/modeling_utils.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2881,9 +2881,7 @@ def _init_weights(self, module):
28812881
# We cannot use `isinstance` on the RMSNorms or LayerNorms, as they usually are custom modules which change names
28822882
# between modelings (because they are prefixed with the model name)
28832883
elif (
2884-
isinstance(
2885-
module, (nn.LayerNorm, nn.RMSNorm, nn.GroupNorm, nn.BatchNorm1d, nn.BatchNorm2d, nn.BatchNorm3d)
2886-
)
2884+
isinstance(module, (nn.GroupNorm, nn.BatchNorm1d, nn.BatchNorm2d, nn.BatchNorm3d))
28872885
or "LayerNorm" in module.__class__.__name__
28882886
or "RMSNorm" in module.__class__.__name__
28892887
):

0 commit comments

Comments
 (0)