]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
gguf-py : decouple adding metadata from writing in GGUFWriter (#7827)
authorcompilade <redacted>
Sun, 9 Jun 2024 02:34:29 +0000 (22:34 -0400)
committerGitHub <redacted>
Sun, 9 Jun 2024 02:34:29 +0000 (12:34 +1000)
commited9f2521185706481501a5e6d5315397b11802ff
treea3cc323be80d09efdcccc7ea34ac74cc4190859e
parentfe1e3917cfa0f9397a765cfd0aef880674d938d5
gguf-py : decouple adding metadata from writing in GGUFWriter (#7827)

Main changes of this PR is to consolidate GGUFWriter.add_key and GGUFWriter.add_val into GGUFWriter.add_key_value.

In addition use_temp_file is now opt-in instead of opt-out defaulting to False.

Also GGUFWriter now does not require output file name until when actually writing to it.

And GGUFWriter doesn't really need to eagerly prepare the data layout of the metadata
convert-hf-to-gguf.py
gguf-py/gguf/gguf_writer.py
gguf-py/scripts/gguf-new-metadata.py