Skip to content

Commit 595228c

Browse files
drop frozen scale_dtype post-merge
Signed-off-by: Brian Dellabetta <[email protected]>
1 parent dd87f23 commit 595228c

File tree

1 file changed

+1
-12
lines changed
  • src/compressed_tensors/quantization/lifecycle

1 file changed

+1
-12
lines changed

src/compressed_tensors/quantization/lifecycle/apply.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -213,18 +213,7 @@ def apply_quantization_status(module: Module, status: QuantizationStatus):
213213

214214
force_zero_point_init = status != QuantizationStatus.COMPRESSED
215215

216-
# When decompressing, we set the scale_dtype as the model's dtype
217-
# This is because the normal workflow of using the weight's dtype
218-
# will be incorrect as the model weight will be compressed
219-
# Therefore, use the dtype set by the user using the PretrainedModel
220-
scale_dtype = None
221-
if status == QuantizationStatus.FROZEN:
222-
if hasattr(module, "dtype"):
223-
scale_dtype = module.dtype
224-
225-
initialize_module_for_quantization(
226-
module, force_zero_point=force_zero_point_init, scale_dtype=scale_dtype
227-
)
216+
initialize_module_for_quantization(module, force_zero_point=force_zero_point_init)
228217

229218
module.quantization_status = status
230219

0 commit comments

Comments
 (0)