From 0b673ca1879ceba8a9f669ba5d61c79a2aade522 Mon Sep 17 00:00:00 2001 From: Jared Van Bortel Date: Sat, 2 Mar 2024 12:14:37 -0500 Subject: [PATCH] s/_MODEL_CLASSES/_model_classes/ --- convert-hf-to-gguf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/convert-hf-to-gguf.py b/convert-hf-to-gguf.py index 9ae6d9c1d..fa9d4f22f 100755 --- a/convert-hf-to-gguf.py +++ b/convert-hf-to-gguf.py @@ -39,7 +39,7 @@ class SentencePieceTokenTypes(IntEnum): AnyModel = TypeVar("AnyModel", bound="type[Model]") class Model(ABC): - _MODEL_CLASSES: dict[str, type[Model]] = {} + _model_classes: dict[str, type[Model]] = {} def __init__(self, dir_model: Path, ftype: int, fname_out: Path, is_big_endian: bool): self.dir_model = dir_model @@ -189,14 +189,14 @@ class Model(ABC): assert names def func(modelcls: type[Model]): for name in names: - cls._MODEL_CLASSES[name] = modelcls + cls._model_classes[name] = modelcls return modelcls return func @classmethod def from_model_architecture(cls, arch): try: - return cls._MODEL_CLASSES[arch] + return cls._model_classes[arch] except KeyError: raise NotImplementedError(f'Architecture {arch!r} not supported!') from None