Skip to content

Commit

Permalink
Merge pull request #36 from ModelTC/Harahan-patch-1
Browse files Browse the repository at this point in the history
fix wanda
  • Loading branch information
llmc-reviewer authored Aug 22, 2024
2 parents b806d50 + d0ab89e commit a657809
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llmc/compression/sparsification/wanda.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def __init__(self, model, sparsity_config, input, config):

@torch.no_grad()
def get_row_scale(self, layer, act):
if len(act) == 2:
if len(act.shape) == 2:
act = act.unsqueeze(0)
nsamples = act.shape[0]
if isinstance(layer, nn.Linear):
Expand Down

0 comments on commit a657809

Please sign in to comment.