summaryrefslogtreecommitdiff
path: root/gguf-py/scripts/__init__.py
diff options
context:
space:
mode:
authorSigbjørn Skjæret <sigbjorn.skjaeret@scala.com>2024-04-18 13:49:01 +0200
committerGitHub <noreply@github.com>2024-04-18 14:49:01 +0300
commit03c0946d73c63ea73e1d85015b7088298443d438 (patch)
tree3add06ebc5f14022771887ca0bce636b39ff8633 /gguf-py/scripts/__init__.py
parente11b2e6e1e18522ca7cf129600875a0f6fb9307d (diff)
convert : support models with multiple chat templates (#6588)
* Support converting models with multiple chat templates Adds the following metadata: * tokenizer.chat_templates * tokenizer.chat_template.<name1> * tokenizer.chat_template.<name2> * tokenizer.chat_template.<...> Where `tokenizer.chat_templates` is an array of the template names (except `default`), `default` is added to the regular `tokenizer.chat_template`. * replace filtered characters with underscore * New script to add/modify/remove metadata This scripts creates a copy of a GGUF file and allows you to add/modify/remove metadata in the process. Most importantly this allows you to update chat templates, either as a string or directly from an updated tokenizer_config.json file. * Add files via upload add new script to project/readme * flake--
Diffstat (limited to 'gguf-py/scripts/__init__.py')
-rw-r--r--gguf-py/scripts/__init__.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/gguf-py/scripts/__init__.py b/gguf-py/scripts/__init__.py
index 77132db7..1ad45639 100644
--- a/gguf-py/scripts/__init__.py
+++ b/gguf-py/scripts/__init__.py
@@ -8,5 +8,6 @@ os.environ["NO_LOCAL_GGUF"] = "TRUE"
gguf_convert_endian_entrypoint = import_module("scripts.gguf-convert-endian").main
gguf_dump_entrypoint = import_module("scripts.gguf-dump").main
gguf_set_metadata_entrypoint = import_module("scripts.gguf-set-metadata").main
+gguf_new_metadata_entrypoint = import_module("scripts.gguf-new-metadata").main
del import_module, os