mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2025-01-07 11:23:56 +01:00
gguf.py : dont add empty strings
This commit is contained in:
parent
a7d226f871
commit
5c5a95ba2d
1
gguf.py
1
gguf.py
@ -114,6 +114,7 @@ class GGUFWriter:
|
|||||||
self.add_val(val, GGUFValueType.BOOL)
|
self.add_val(val, GGUFValueType.BOOL)
|
||||||
|
|
||||||
def add_string(self, key: str, val: str):
|
def add_string(self, key: str, val: str):
|
||||||
|
if len(val) == 0: return
|
||||||
self.add_key(key)
|
self.add_key(key)
|
||||||
self.add_val(val, GGUFValueType.STRING)
|
self.add_val(val, GGUFValueType.STRING)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user