Skip to content

Commit 3e4d7fa

Browse files
authored
[Quantization] Always save g_idx when initialized (#467)
Remove conditional skip for g_idx saving in compression. Since g_idx is only initialized when needed, we should always save it when present rather than checking for uninitialized values. Signed-off-by: Rahul Tuli <[email protected]>
1 parent c688c79 commit 3e4d7fa

File tree

1 file changed

+0
-8
lines changed
  • src/compressed_tensors/compressors/quantized_compressors

1 file changed

+0
-8
lines changed

src/compressed_tensors/compressors/quantized_compressors/base.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,6 @@ def compress(
129129
if name.endswith("zero_point") and self._skip_zp(name, names_to_scheme):
130130
continue
131131

132-
# omit saving for g_idx if uninitialized
133-
# TODO: does this case actually occur?
134-
elif (
135-
name.endswith("g_idx")
136-
and value.device.type != "meta"
137-
and torch.any(value <= -1)
138-
):
139-
continue
140132
compressed_dict[name] = value.to(compression_device)
141133

142134
return compressed_dict

0 commit comments

Comments
 (0)