瀏覽代碼

py : fix wrong input type for raw_dtype in ggml to gguf scripts (#8928)

Co-authored-by: farbod <farbod.bjary82@gmail.com>
Farbod Bijary 1 年之前
父節點
當前提交
ee2984bdaf
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      convert_llama_ggml_to_gguf.py

+ 1 - 1
convert_llama_ggml_to_gguf.py

@@ -116,7 +116,7 @@ class Tensor:
         assert quant is not None, 'Unknown tensor type'
         (blksize, tysize) = quant
         offset += 12
-        self.dtype= dtype
+        self.dtype= gguf.GGMLQuantizationType(dtype)
         self.dims = struct.unpack(f'<{n_dims}I', data[offset:offset + (4 * n_dims)])
         offset += 4 * n_dims
         self.name = bytes(data[offset:offset + name_len])