fix code style

This commit is contained in:
toyer 2024-06-25 02:22:55 +00:00
parent 95708067c9
commit 3b67ff808a
3 changed files with 3 additions and 3 deletions

View file

@ -2895,6 +2895,7 @@ class T5Model(Model):
return [(self.map_tensor_name(name), data_torch)]
@Model.register("ChatGLMModel")
class ChatGLMModel(Model):
model_arch = gguf.MODEL_ARCH.CHATGLM
@ -3081,7 +3082,6 @@ class ChatGLMModel(Model):
return [(self.map_tensor_name(name), data_torch)]
###### CONVERSION LOGIC ######

View file

@ -119,7 +119,6 @@ class Keys:
EOS_ID_LIST = "tokenizer.ggml.eos_token_id_list"
#
# recommended mapping of model tensor names for storage in gguf
#
@ -164,6 +163,7 @@ class MODEL_ARCH(IntEnum):
BITNET = auto()
T5 = auto()
class MODEL_TENSOR(IntEnum):
TOKEN_EMBD = auto()
TOKEN_EMBD_NORM = auto()

View file

@ -608,7 +608,7 @@ class GGUFWriter:
def add_bos_token_id(self, id: int) -> None:
self.add_uint32(Keys.Tokenizer.BOS_ID, id)
def add_eos_token_id_list(self, id: Sequence[str] | Sequence[bytes] | Sequence[bytearray]) -> None:
self.add_array(Keys.Tokenizer.EOS_ID_LIST, id)