Skip to content

Commit

Permalink
tensor return error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
horheynm committed Apr 29, 2024
1 parent 8a2224f commit d3f0803
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/compressed_tensors/quantization/observers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,4 @@ def get_qparams_per_channel(self, observed, channel: int):
scales.append(scale)
zero_points.append(zero_point)

return torch.cat(scales), torch.cat(zero_points)
return torch.stack(scales), torch.stack(zero_points)
1 change: 0 additions & 1 deletion src/compressed_tensors/quantization/observers/min_max.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ def __init__(
self.max_val = -float("inf")
self.averaging_constant = averaging_constant


def calculate_qparams(self, observed: Tensor) -> Tuple[FloatTensor, IntTensor]:
"""
Updates the observed min and max using a moving average smoothed by the
Expand Down

0 comments on commit d3f0803

Please sign in to comment.