diff options
author | Georgi Gerganov <ggerganov@gmail.com> | 2023-08-22 20:05:59 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-22 20:05:59 +0300 |
commit | deb7dfca4b9725cd295d1426db75fe8e0a6d5312 (patch) | |
tree | f36daf023af86b6005325cbb4ee80a7966255e59 /gguf.py | |
parent | bac66994cf356cf488078c056831396eb4ce31d5 (diff) |
gguf : add ftype meta info to the model (#2710)
* llama : add ftype meta info to the model
ggml-ci
* convert.py : add ftype when converting (does not work)
* convert.py : fix Enum to IntEnum
ggml-ci
Diffstat (limited to 'gguf.py')
-rw-r--r-- | gguf.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -26,6 +26,7 @@ KEY_GENERAL_DESCRIPTION = "general.description" KEY_GENERAL_LICENSE = "general.license" KEY_GENERAL_SOURCE_URL = "general.source.url" KEY_GENERAL_SOURCE_HF_REPO = "general.source.hugginface.repository" +KEY_GENERAL_FILE_TYPE = "general.file_type" # LLM KEY_LLM_CONTEXT_LENGTH = "{arch}.context_length" @@ -595,6 +596,9 @@ class GGUFWriter: def add_source_hf_repo(self, repo: str): self.add_string(KEY_GENERAL_SOURCE_HF_REPO, repo) + def add_file_type(self, ftype: int): + self.add_uint32(KEY_GENERAL_FILE_TYPE, ftype) + def add_name(self, name: str): self.add_string(KEY_GENERAL_NAME, name) |