Skip to content

Commit fe9c1e6

Browse files
committed
fix style
Signed-off-by: shanjiaz <zsjwpianpian@gmail.com>
1 parent 1e71b0a commit fe9c1e6

File tree

3 files changed

+1
-4
lines changed

3 files changed

+1
-4
lines changed

src/compressed_tensors/compressors/sparse_compressors/base.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
from torch import Tensor
2626
from tqdm import tqdm
2727

28-
from torch.nn import Module
2928

3029

3130
__all__ = ["BaseSparseCompressor"]
@@ -96,7 +95,6 @@ def compress(
9695
prefix = prefix[: -(len(".weight"))]
9796

9897
compression_data = self.compress_weight(prefix, value)
99-
10098
for key in compression_data.keys():
10199
if key in compressed_dict:
102100
_LOGGER.warn(

src/compressed_tensors/compressors/sparse_compressors/sparse_24_bitmask.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ def compress_weight(self, name, value):
5656
bitmask_tensor = Sparse24BitMaskTensor.from_dense(
5757
value, self.config.sparsity_structure
5858
)
59-
# Normal flow: return compression dict
6059
return bitmask_tensor.dict(
6160
name_prefix=name,
6261
device="meta" if value.device.type == "meta" else "cpu",

src/compressed_tensors/compressors/sparse_compressors/sparse_bitmask.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def compression_param_names(self) -> Tuple[str]:
4646
"""
4747
return ("shape", "compressed", "bitmask", "row_offsets")
4848

49-
def compress_weight(self, name, value, **kwargs):
49+
def compress_weight(self, name, value):
5050
bitmask_tensor = BitmaskTensor.from_dense(value)
5151
bitmask_dict = bitmask_tensor.dict(name_prefix=name, device="cpu")
5252
return bitmask_dict

0 commit comments

Comments
 (0)