Explorar o código

Fix conversion script

Sengxian %!s(int64=2) %!d(string=hai) anos
pai
achega
f9276c6988
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      tools/convert_tp.py

+ 1 - 1
tools/convert_tp.py

@@ -117,7 +117,7 @@ def create_checkpoint(
                 is_glu=name in GLU_LAYERS,
                 quantization_bit_width=quantization_bit_width if name in QUANTIZED_LAYERS else None,
             )
-            if name in QUANTIZED_LAYERS:
+            if quantization_bit_width is not None and name in QUANTIZED_LAYERS:
                 new_sd[key], new_sd[f"{key}_scale"] = new_sd[key]
     new_sd = {"module": new_sd}
     return new_sd