Skip to content

Commit be74a47

Browse files
committed
remove comment
Signed-off-by: shanjiaz <zsjwpianpian@gmail.com>
1 parent f36f550 commit be74a47

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/compressed_tensors/compressors/model_compressors/model_compressor.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -699,8 +699,7 @@ def _replace_sparsity_weights(self, dense_weight_generator, model: Module):
699699
params_device = next(module.parameters()).device
700700
device = "cpu" if has_offloaded_params(module) else params_device
701701
delattr(module, param_name)
702-
#requires_grad = data.dtype in (torch.float16, torch.float32, torch.bfloat16)
703-
requires_grad = torch.is_floating_point(data)
702+
requires_grad = data.dtype in (torch.float16, torch.float32, torch.bfloat16)
704703

705704
param = torch.nn.Parameter(data.to(device), requires_grad=requires_grad)
706705
register_offload_parameter(module, param_name, param)

0 commit comments

Comments
 (0)