code format
This commit is contained in:
parent
ad6fd8de25
commit
6a13722ca5
1 changed files with 2 additions and 3 deletions
|
@ -6,7 +6,6 @@ from __future__ import annotations
|
|||
|
||||
import logging
|
||||
import os
|
||||
import mmap
|
||||
import struct
|
||||
from collections import OrderedDict
|
||||
from typing import Any, Literal, NamedTuple, TypeVar, Union
|
||||
|
@ -174,7 +173,7 @@ class GGUFReader:
|
|||
def _get_str(self, offset: int, return_size=False) -> tuple[npt.NDArray[np.uint64], npt.NDArray[np.uint8]]:
|
||||
self.data.seek(offset)
|
||||
slen = struct.unpack('<Q', self.data.read(8))
|
||||
sdata = struct.unpack('<'+'B'*slen[0], self.data.read(1*slen[0]))
|
||||
sdata = struct.unpack('<' + 'B' * slen[0], self.data.read(slen[0]))
|
||||
output = (slen, sdata)
|
||||
if return_size:
|
||||
output += (8 + slen[0],)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue