Skip to content

Commit

Permalink
[Hotfix] Fix OPT gradient checkpointing forward
Browse files Browse the repository at this point in the history
Co-authored-by: Edenzzzz <[email protected]>
  • Loading branch information
Edenzzzz and Edenzzzz committed Jul 3, 2024
1 parent ea94c07 commit eb24fcd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion colossalai/shardformer/modeling/opt.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def opt_model_forward(
past_key_value = past_key_values[idx] if past_key_values is not None else None

if decoder.gradient_checkpointing and decoder.training:
layer_outputs = self._gradient_checkpointing_func(
layer_outputs = self.decoder._gradient_checkpointing_func(
decoder_layer.__call__,
hidden_states,
causal_attention_mask,
Expand Down

0 comments on commit eb24fcd

Please sign in to comment.