refactor: Add support for model file types
This commit is contained in:
parent
2ffe6b89c8
commit
63c3410492
1 changed files with 15 additions and 9 deletions
|
@ -969,18 +969,24 @@ VOCAB_TYPE_NAMES: dict[VocabType, str] = {
|
||||||
# Model File Types
|
# Model File Types
|
||||||
#
|
#
|
||||||
class ModelFileType(IntEnum):
|
class ModelFileType(IntEnum):
|
||||||
UNK = auto() # Unsupported file type
|
UNK = auto()
|
||||||
SFT = auto() # SafeTensor file type
|
PT = auto()
|
||||||
PTH = auto() # PyTorch file type
|
PTH = auto()
|
||||||
BIN = auto() # Pickled file type
|
BIN = auto()
|
||||||
PT = auto() # PyTorch file type
|
SAFETENSORS = auto()
|
||||||
|
JSON = auto()
|
||||||
|
MODEL = auto()
|
||||||
|
GGUF = auto()
|
||||||
|
|
||||||
|
|
||||||
MODEL_FILE_TYPE_NAMES: dict[ModelFileType, str] = {
|
MODEL_FILE_TYPE_NAMES: dict[ModelFileType, str] = {
|
||||||
ModelFileType.PT: "pt",
|
ModelFileType.PT: ".pt",
|
||||||
ModelFileType.PTH: "pth",
|
ModelFileType.PTH: ".pth",
|
||||||
ModelFileType.BIN: "bin",
|
ModelFileType.BIN: ".bin",
|
||||||
ModelFileType.SFT: "safetensors",
|
ModelFileType.SAFETENSORS: ".safetensors",
|
||||||
|
ModelFileType.JSON: ".json",
|
||||||
|
ModelFileType.MODEL: ".model",
|
||||||
|
ModelFileType.GGUF: ".gguf",
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue