Skip to content

Commit 0ee5778

Browse files
committed
Style Changes
1 parent 3b96a51 commit 0ee5778

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/transformers/quantizers/quantizer_compressed_tensors.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,10 @@ def _process_model_before_weight_loading(self, model, **kwargs):
121121
logger.warn(
122122
"`run_compressed` is only supported for quantized_compressed models"
123123
" and not for sparsified models. Setting `run_compressed=False`"
124-
)
124+
)
125125
self.run_compressed = False
126126
elif self.is_quantized and not self.is_quantization_compressed:
127-
logger.warn(
128-
"`run_compressed` is only supported for compressed models."
129-
"Setting `run_compressed=False`"
130-
)
127+
logger.warn("`run_compressed` is only supported for compressed models.Setting `run_compressed=False`")
131128
self.run_compressed = False
132129
apply_quantization_config(model, ct_quantization_config, run_compressed=self.run_compressed)
133130
elif self.is_quantized and not self.is_quantization_compressed:

tests/quantization/compressed_tensors_integration/test_compressed_models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ def test_default_run_compressed__True(self):
185185
def test_default_run_compressed__False(self):
186186
from compressed_tensors.linear.compressed_linear import CompressedLinear
187187
from compressed_tensors.quantization.utils import iter_named_leaf_modules
188+
188189
from transformers.utils.quantization_config import CompressedTensorsConfig
189190

190191
quantization_config = CompressedTensorsConfig(run_compressed=False)

0 commit comments

Comments
 (0)