Skip to content

Commit

Permalink
free extra memory
Browse files Browse the repository at this point in the history
  • Loading branch information
Sara Adkins committed Aug 13, 2024
1 parent b7280e1 commit 453022a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/llmcompressor/modifiers/smoothquant/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,9 @@ def smooth(module):
smooth(layer)
smooth(smooth_layer)

# clear out allocated smoothing scales
torch.cuda.empty_cache()

def _calculate_smoothing_scales(
self, balance_layers: List[Module], activation_scales: torch.Tensor
) -> List[float]:
Expand Down

0 comments on commit 453022a

Please sign in to comment.