sort imports with isort (again)
This commit is contained in:
parent
d7688dc937
commit
a6f5742a53
6 changed files with 12 additions and 8 deletions
|
@ -1,5 +1,5 @@
|
|||
from .constants import *
|
||||
from .gguf_writer import *
|
||||
from .gguf_reader import *
|
||||
from .gguf_writer import *
|
||||
from .tensor_mapping import *
|
||||
from .vocab import *
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
from enum import Enum, IntEnum, auto, StrEnum
|
||||
from enum import Enum, IntEnum, StrEnum, auto
|
||||
from typing import Any, NamedTuple, Type
|
||||
|
||||
#
|
||||
|
|
|
@ -2,7 +2,7 @@ from __future__ import annotations
|
|||
|
||||
import os
|
||||
from collections import OrderedDict
|
||||
from typing import Any, TypeVar, NamedTuple, Dict, Type, Literal
|
||||
from typing import Any, Dict, Literal, NamedTuple, Type, TypeVar
|
||||
|
||||
import numpy as np
|
||||
import numpy.typing as npt
|
||||
|
@ -15,12 +15,12 @@ if __name__ == "__main__":
|
|||
sys.path.insert(0, str(Path(__file__).parent.parent))
|
||||
|
||||
from gguf.constants import (
|
||||
GGML_QUANT_SIZES,
|
||||
GGUF_DEFAULT_ALIGNMENT,
|
||||
GGUF_MAGIC,
|
||||
GGUF_VERSION,
|
||||
GGML_QUANT_SIZES,
|
||||
GGMLQuantizationType,
|
||||
GGUFValueType,
|
||||
GGUFValueType
|
||||
)
|
||||
|
||||
READER_SUPPORTED_VERSIONS = [2, GGUF_VERSION]
|
||||
|
|
|
@ -4,9 +4,9 @@ import os
|
|||
import shutil
|
||||
import struct
|
||||
import tempfile
|
||||
from io import BufferedWriter
|
||||
from enum import Enum, auto
|
||||
from typing import Any, IO, Sequence
|
||||
from io import BufferedWriter
|
||||
from typing import IO, Any, Sequence
|
||||
|
||||
import numpy as np
|
||||
|
||||
|
@ -19,9 +19,10 @@ from .constants import (
|
|||
GGUFEndian,
|
||||
GGUFValueType,
|
||||
RopeScalingType,
|
||||
TokenType,
|
||||
TokenType
|
||||
)
|
||||
|
||||
|
||||
class WriterState(Enum):
|
||||
EMPTY = auto()
|
||||
HEADER = auto()
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import Sequence
|
||||
|
||||
from .constants import MODEL_ARCH, MODEL_TENSOR, MODEL_TENSORS, TENSOR_NAMES
|
||||
|
||||
|
||||
class TensorNameMap:
|
||||
mappings_cfg: dict[MODEL_TENSOR, tuple[str, ...]] = {
|
||||
# Token embeddings
|
||||
|
|
|
@ -8,6 +8,7 @@ from typing import Any, Callable
|
|||
|
||||
from .gguf_writer import GGUFWriter
|
||||
|
||||
|
||||
class SpecialVocab:
|
||||
merges: list[str]
|
||||
special_token_ids: dict[str, int]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue