Skip to content

Commit b4c8ce5

Browse files
Added exit after All Quant
1 parent 27778cb commit b4c8ce5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

optmodel.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -906,14 +906,15 @@ def remove_all_dense_hooks(module):
906906

907907
if scale_val != 0.0 or zero_val != 0.0:
908908
valid_quantizers += 1
909-
print(f" ✅ {name}: scale={scale_val:.6f}, zero={zero_val:.6f}")
909+
# print(f" ✅ {name}: scale={scale_val:.6f}, zero={zero_val:.6f}")
910910
else:
911-
print(f" ⚠️ {name}: scale={scale_val:.6f}, zero={zero_val:.6f} (may not be properly quantized)")
911+
# print(f" ⚠️ {name}: scale={scale_val:.6f}, zero={zero_val:.6f} (may not be properly quantized)")
912912
else:
913913
print(f" ❌ {name}: missing scale or zero attributes")
914914

915915
if valid_quantizers > 0:
916916
print(f"\n✅ Quantization appears to be working ({valid_quantizers}/{len(quantizers)} valid quantizers)")
917+
exit(1)
917918
else:
918919
print(f"\n❌ No valid quantizers found. Quantization may not be working properly.")
919920
print("Exiting to debug quantization issues...")

0 commit comments

Comments
 (0)