Skip to content

Commit

Permalink
flake : fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ggerganov authored and NeoZhangJianyu committed Mar 5, 2024
1 parent 86e4a3b commit dabfd53
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions convert-hf-to-gguf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]] = {}

Expand Down Expand Up @@ -187,6 +189,7 @@ def load_hparams(dir_model):
@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
Expand Down

0 comments on commit dabfd53

Please sign in to comment.