Skip to content

Commit

Permalink
only gather the current transformer layer (#2173) (#2174)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sara Adkins authored Mar 12, 2024
1 parent 9ae35bd commit 7d2f7ce
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/sparseml/modifiers/utils/layer_compressor.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ def revert_layer_wrappers(self):
Reverts wrapped root modules back to their original structure
"""
for name, module_wrapper in self.modules.items():
full_name = self._get_full_submodule_name(name)
set_layer(full_name, module_wrapper.layer, self.model)
set_layer(name, module_wrapper.layer, self.layer)
module_wrapper.free()
self.modules = None

Expand Down

0 comments on commit 7d2f7ce

Please sign in to comment.