Spaces:
Running
Running
Fix big endian GGUFs
Browse files- _hf_gguf.py +5 -1
_hf_gguf.py
CHANGED
@@ -202,7 +202,11 @@ class HuggingGGUFstream:
|
|
202 |
data = self._read_field(GGUFValueType.UINT32)
|
203 |
if data.value != 3:
|
204 |
if data.value == 3 << 24:
|
205 |
-
data
|
|
|
|
|
|
|
|
|
206 |
self.endian = '>'
|
207 |
else:
|
208 |
raise TypeError('Unsupported GGUF version')
|
|
|
202 |
data = self._read_field(GGUFValueType.UINT32)
|
203 |
if data.value != 3:
|
204 |
if data.value == 3 << 24:
|
205 |
+
data = GGUFData(
|
206 |
+
type = data.type,
|
207 |
+
value = 3,
|
208 |
+
data = data.data,
|
209 |
+
)
|
210 |
self.endian = '>'
|
211 |
else:
|
212 |
raise TypeError('Unsupported GGUF version')
|