From: Georgi Gerganov Date: Mon, 4 Mar 2024 19:50:50 +0000 (+0200) Subject: flake : fix X-Git-Tag: upstream/0.0.4488~2147 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=e0843afe1b37890b631bc7d3d2da2ed36c862b91;p=pkg%2Fggml%2Fsources%2Fllama.cpp flake : fix --- diff --git a/convert-hf-to-gguf.py b/convert-hf-to-gguf.py index ffdba744..f6369af3 100755 --- a/convert-hf-to-gguf.py +++ b/convert-hf-to-gguf.py @@ -36,8 +36,10 @@ class SentencePieceTokenTypes(IntEnum): UNUSED = 5 BYTE = 6 + AnyModel = TypeVar("AnyModel", bound="type[Model]") + class Model(ABC): _model_classes: dict[str, type[Model]] = {} @@ -187,6 +189,7 @@ class Model(ABC): @classmethod def register(cls, *names: str) -> Callable[[AnyModel], AnyModel]: assert names + def func(modelcls: type[Model]): for name in names: cls._model_classes[name] = modelcls