Skip to content

Commit

Permalink
Ignore Dense sparsity config (#169)
Browse files Browse the repository at this point in the history
  • Loading branch information
rahul-tuli authored Sep 26, 2024
1 parent 44dda93 commit 6ed94e6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/compressed_tensors/compressors/model_compressor.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,11 @@ def __init__(
self.sparsity_compressor = None
self.quantization_compressor = None


if sparsity_config and sparsity_config.format == CompressionFormat.dense.value:
# ignore dense sparsity config
self.sparsity_config = None

if sparsity_config is not None:
self.sparsity_compressor = Compressor.load_from_registry(
sparsity_config.format, config=sparsity_config
Expand Down

0 comments on commit 6ed94e6

Please sign in to comment.