From dfac0c4b3e6e575284b273c68df995023250379c Mon Sep 17 00:00:00 2001 From: Qingtao Li Date: Fri, 11 Oct 2024 14:43:14 +0800 Subject: [PATCH] Remove uint8 branch in gguf_writer. --- gguf-py/gguf/gguf_writer.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gguf-py/gguf/gguf_writer.py b/gguf-py/gguf/gguf_writer.py index e2b4838bf..0d8d8a0b0 100644 --- a/gguf-py/gguf/gguf_writer.py +++ b/gguf-py/gguf/gguf_writer.py @@ -345,10 +345,8 @@ class GGUFWriter: dtype = GGMLQuantizationType.I32 elif tensor_dtype == np.int64: dtype = GGMLQuantizationType.I64 - elif tensor_dtype == np.uint8: - dtype = GGMLQuantizationType.I2 else: - raise ValueError("Only F16, F32, F64, I8, I16, I32, I64, I2 tensors are supported for now") + raise ValueError("Only F16, F32, F64, I8, I16, I32, I64 tensors are supported for now") else: dtype = raw_dtype if tensor_dtype == np.uint8: