Skip to content

Commit 9e38510

Browse files
Delete redundancy if case in model_utils (#36559)
Signed-off-by: zhanluxianshen <[email protected]>
1 parent acc49e3 commit 9e38510

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
@@ -1482,11 +1482,9 @@ def post_init(self):
14821482
"""
14831483
self.init_weights()
14841484
self._backward_compatibility_gradient_checkpointing()
1485-
# If current model is a base model, attach `base_model_tp_plan` from config
1485+
# If current model is a base model, attach `base_model_tp_plan` and `base_model_pp_plan` from config
14861486
if self.base_model is self:
14871487
self._tp_plan = self.config.base_model_tp_plan
1488-
# If current model is a base model, attach `base_model_pp_plan` from config
1489-
if self.base_model is self:
14901488
self._pp_plan = self.config.base_model_pp_plan
14911489

14921490
def dequantize(self):

0 commit comments

Comments
 (0)