]> git.djapps.eu Git - pkg/ggml/sources/ggml/commit
gguf : add support for I64 and F64 arrays (llama/6062)
authorOndřej Čertík <redacted>
Fri, 15 Mar 2024 08:46:51 +0000 (02:46 -0600)
committerGeorgi Gerganov <redacted>
Wed, 27 Mar 2024 11:20:00 +0000 (13:20 +0200)
commite1949cab75be42a5fa3121dd065607d4dc92d02a
treefdea492f49154f3b369d786fd79ac6b353e112a7
parentf5c9599cdba3133da0158dce061b33413b49f6fd
gguf : add support for I64 and F64 arrays (llama/6062)

* gguf : add support for I64 and F64 arrays

GGML currently does not support I64 or F64 arrays and they are not often
used in machine learning, however if in the future the need arises, it
would be nice to add them now, so that the types are next to the other
types I8, I16, I32 in the enums, and it also reserves their type number.

Furthermore, with this addition the GGUF format becomes very usable for
most computational applications of NumPy (being compatible with the most
common NumPy dtypes: i8, i16, i32, i64, f32, f64), providing a faster,
and more versatile alternative to the `npz` format, and a simpler
alternative to the `hdf5` format.

The change in this PR seems small, not significantly increasing the
maintenance burden. I tested this from Python using GGUFWriter/Reader
and `gguf-dump`, as well as from C, everything seems to work.

* Fix compiler warnings
include/ggml/ggml.h
src/ggml.c