optimize offsets calculation
This commit is contained in:
parent
dd320df4b4
commit
1dc02150bc
1 changed files with 2 additions and 2 deletions
|
@ -203,9 +203,9 @@ class GGUFReader:
|
|||
# Handle arrays.
|
||||
if gtype == GGUFValueType.ARRAY:
|
||||
raw_itype = self._get(offs, np.uint32)
|
||||
offs += int(raw_itype.nbytes)
|
||||
offs = self.data.tell()
|
||||
alen = self._get(offs, np.uint64)
|
||||
offs += int(alen.nbytes)
|
||||
offs = self.data.tell()
|
||||
aparts: list[npt.NDArray[Any]] = [raw_itype, alen]
|
||||
data_idxs: list[int] = []
|
||||
for idx in range(alen[0]):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue