Skip to content

Commit

Permalink
Undo original forward link
Browse files Browse the repository at this point in the history
  • Loading branch information
muellerzr committed Oct 31, 2023
1 parent bc58807 commit d1df551
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/accelerate/accelerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1372,7 +1372,7 @@ def prepare_model(self, model: torch.nn.Module, device_placement: bool = None, e
with torch.no_grad():
convert_model(model)
model._converted_to_transformer_engine = True
#model._original_forward = model.forward
model._original_forward = model.forward

kwargs = self.fp8_recipe_handler.to_kwargs() if self.fp8_recipe_handler is not None else {}
if "fp8_format" in kwargs:
Expand Down

0 comments on commit d1df551

Please sign in to comment.