Add support for I8, I16, I32 to gguf_reader
This commit is contained in:
parent
c5423753f7
commit
fc5d6e6513
1 changed files with 9 additions and 0 deletions
|
@ -248,6 +248,15 @@ class GGUFReader:
|
||||||
elif ggml_type == GGMLQuantizationType.F16:
|
elif ggml_type == GGMLQuantizationType.F16:
|
||||||
item_count = n_elems
|
item_count = n_elems
|
||||||
item_type = np.float16
|
item_type = np.float16
|
||||||
|
elif ggml_type == GGMLQuantizationType.I8:
|
||||||
|
item_count = n_elems
|
||||||
|
item_type = np.int8
|
||||||
|
elif ggml_type == GGMLQuantizationType.I16:
|
||||||
|
item_count = n_elems
|
||||||
|
item_type = np.int16
|
||||||
|
elif ggml_type == GGMLQuantizationType.I32:
|
||||||
|
item_count = n_elems
|
||||||
|
item_type = np.int32
|
||||||
else:
|
else:
|
||||||
item_count = n_bytes
|
item_count = n_bytes
|
||||||
item_type = np.uint8
|
item_type = np.uint8
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue