Skip to content

Commit b8a443a

Browse files
authored
Model Compression: Set compression status (#318)
* set compression status Signed-off-by: Kyle Sayers <kylesayrs@gmail.com> * remove comment Signed-off-by: Kyle Sayers <kylesayrs@gmail.com> * add back comment Signed-off-by: Kyle Sayers <kylesayrs@gmail.com> --------- Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
1 parent f192f68 commit b8a443a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/compressed_tensors/compressors/model_compressors/model_compressor.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,13 @@ def compress_model(self, model: Module):
421421

422422
module.quantization_status = QuantizationStatus.COMPRESSED
423423

424+
# TODO: consider sparse compression to also be compression
425+
if (
426+
self.quantization_config is not None
427+
and self.quantization_config.format != CompressionFormat.dense.value
428+
):
429+
self.quantization_config.quantization_status = QuantizationStatus.COMPRESSED
430+
424431
def decompress_model(self, model: Module):
425432
"""
426433
Decompress a model in memory. Because the model structure is modified in place,

0 commit comments

Comments
 (0)