CISCai commited on
Commit
84afff1
1 Parent(s): 6ca68af

Fix big endian GGUFs

Browse files
Files changed (1) hide show
  1. _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.value = 3
 
 
 
 
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')