Skip to content

Commit f48e792

Browse files
committed
appease pyright
1 parent ce73722 commit f48e792

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

convert_hf_to_gguf.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import os
1212
import re
1313
import sys
14-
from abc import ABC, abstractmethod
1514
from enum import IntEnum
1615
from pathlib import Path
1716
from hashlib import sha256
@@ -52,7 +51,7 @@ class ModelType(IntEnum):
5251
AnyModel = TypeVar("AnyModel", bound="type[ModelBase]")
5352

5453

55-
class ModelBase(ABC):
54+
class ModelBase:
5655
_model_classes: dict[ModelType, dict[str, type[ModelBase]]] = {
5756
ModelType.TEXT: {},
5857
ModelType.VISION: {},
@@ -137,11 +136,6 @@ def get_remote_tensors() -> Iterator[tuple[str, Tensor]]:
137136
self.gguf_writer = gguf.GGUFWriter(path=None, arch=gguf.MODEL_ARCH_NAMES[self.model_arch], endianess=self.endianess, use_temp_file=self.use_temp_file,
138137
split_max_tensors=split_max_tensors, split_max_size=split_max_size, dry_run=dry_run, small_first_shard=small_first_shard)
139138

140-
@property
141-
@abstractmethod
142-
def model_type(self):
143-
raise NotImplementedError
144-
145139
@classmethod
146140
def add_prefix_to_filename(cls, path: Path, prefix: str) -> Path:
147141
stem, suffix = path.stem, path.suffix

0 commit comments

Comments
 (0)