mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-25 17:29:22 +01:00
Fix GGUF metadata reading for falcon
This commit is contained in:
parent
9331ab4798
commit
78811dd89a
@ -50,7 +50,11 @@ value_type_info = {
|
|||||||
def get_single(value_type, file):
|
def get_single(value_type, file):
|
||||||
if value_type == GGUFValueType.STRING:
|
if value_type == GGUFValueType.STRING:
|
||||||
value_length = struct.unpack("<Q", file.read(8))[0]
|
value_length = struct.unpack("<Q", file.read(8))[0]
|
||||||
value = file.read(value_length).decode('utf-8')
|
value = file.read(value_length)
|
||||||
|
try:
|
||||||
|
value = value.decode('utf-8')
|
||||||
|
except:
|
||||||
|
pass
|
||||||
else:
|
else:
|
||||||
type_str = _simple_value_packing.get(value_type)
|
type_str = _simple_value_packing.get(value_type)
|
||||||
bytes_length = value_type_info.get(value_type)
|
bytes_length = value_type_info.get(value_type)
|
||||||
|
Loading…
Reference in New Issue
Block a user