We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d7369ea commit 9f76b6aCopy full SHA for 9f76b6a
convert-hf-to-gguf.py
@@ -36,8 +36,10 @@ class SentencePieceTokenTypes(IntEnum):
36
UNUSED = 5
37
BYTE = 6
38
39
+
40
AnyModel = TypeVar("AnyModel", bound="type[Model]")
41
42
43
class Model(ABC):
44
_model_classes: dict[str, type[Model]] = {}
45
@@ -187,6 +189,7 @@ def load_hparams(dir_model):
187
189
@classmethod
188
190
def register(cls, *names: str) -> Callable[[AnyModel], AnyModel]:
191
assert names
192
193
def func(modelcls: type[Model]):
194
for name in names:
195
cls._model_classes[name] = modelcls
0 commit comments