summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorGeorgi Gerganov <ggerganov@gmail.com>2023-08-27 14:19:54 +0300
committerGitHub <noreply@github.com>2023-08-27 14:19:54 +0300
commitd0cee0d36d5be95a0d9088b674dbb27354107221 (patch)
treebb5db56b4d1a9ea71eb1651485a38034b6acc3f2 /examples
parentedd4c1481708fcd788b0e423268304fd26e2b125 (diff)
gguf : add 64-bit support (GGUF v2) (#2821)
* gguf : bump version to 2 * gguf : add support for 64-bit (no backwards comp yet) * gguf : v1 backwards comp * gguf.py : bump GGUF version * gguf.py : uint64_t on all lengths, sizes and counts, enums still uint32_t * gguf.py : string lengths uint32_t * gguf : update all counts to 64-bit * gguf.py : string len uint64_t and n_dims uint32_t * gguf : fix typo * llama.cpp : print gguf version --------- Co-authored-by: klosax <131523366+klosax@users.noreply.github.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/gguf/gguf.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/gguf/gguf.cpp b/examples/gguf/gguf.cpp
index dee00df8..cda517bd 100644
--- a/examples/gguf/gguf.cpp
+++ b/examples/gguf/gguf.cpp
@@ -30,6 +30,9 @@ bool gguf_ex_write(const std::string & fname) {
gguf_set_val_u32 (ctx, "some.parameter.uint32", 0x12345678);
gguf_set_val_i32 (ctx, "some.parameter.int32", -0x12345679);
gguf_set_val_f32 (ctx, "some.parameter.float32", 0.123456789f);
+ gguf_set_val_u64 (ctx, "some.parameter.uint64", 0x123456789abcdef0ull);
+ gguf_set_val_i64 (ctx, "some.parameter.int64", -0x123456789abcdef1ll);
+ gguf_set_val_f64 (ctx, "some.parameter.float64", 0.1234567890123456789);
gguf_set_val_bool(ctx, "some.parameter.bool", true);
gguf_set_val_str (ctx, "some.parameter.string", "hello world");