Skip to content

Commit

Permalink
Keeping it simple.
Browse files Browse the repository at this point in the history
Co-authored-by: Marc Sun <[email protected]>
  • Loading branch information
ggoggam and SunMarc authored Dec 13, 2024
1 parent c3e69c5 commit 28fecc2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/accelerate/utils/other.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,9 @@ def _recursive_unwrap(module):
if getattr(model, "_converted_to_transformer_engine", False):
convert_model(model, to_transformer_engine=False)

if keep_torch_compile:
if is_compiled:
compiled_model._orig_mod = model
model = compiled_model
if keep_torch_compile and is_compiled:
compiled_model._orig_mod = model
model = compiled_model

return model

Expand Down

0 comments on commit 28fecc2

Please sign in to comment.