fix code style
This commit is contained in:
parent
95708067c9
commit
3b67ff808a
3 changed files with 3 additions and 3 deletions
|
@ -2895,6 +2895,7 @@ class T5Model(Model):
|
||||||
|
|
||||||
return [(self.map_tensor_name(name), data_torch)]
|
return [(self.map_tensor_name(name), data_torch)]
|
||||||
|
|
||||||
|
|
||||||
@Model.register("ChatGLMModel")
|
@Model.register("ChatGLMModel")
|
||||||
class ChatGLMModel(Model):
|
class ChatGLMModel(Model):
|
||||||
model_arch = gguf.MODEL_ARCH.CHATGLM
|
model_arch = gguf.MODEL_ARCH.CHATGLM
|
||||||
|
@ -3081,7 +3082,6 @@ class ChatGLMModel(Model):
|
||||||
return [(self.map_tensor_name(name), data_torch)]
|
return [(self.map_tensor_name(name), data_torch)]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
###### CONVERSION LOGIC ######
|
###### CONVERSION LOGIC ######
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,6 @@ class Keys:
|
||||||
EOS_ID_LIST = "tokenizer.ggml.eos_token_id_list"
|
EOS_ID_LIST = "tokenizer.ggml.eos_token_id_list"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# recommended mapping of model tensor names for storage in gguf
|
# recommended mapping of model tensor names for storage in gguf
|
||||||
#
|
#
|
||||||
|
@ -164,6 +163,7 @@ class MODEL_ARCH(IntEnum):
|
||||||
BITNET = auto()
|
BITNET = auto()
|
||||||
T5 = auto()
|
T5 = auto()
|
||||||
|
|
||||||
|
|
||||||
class MODEL_TENSOR(IntEnum):
|
class MODEL_TENSOR(IntEnum):
|
||||||
TOKEN_EMBD = auto()
|
TOKEN_EMBD = auto()
|
||||||
TOKEN_EMBD_NORM = auto()
|
TOKEN_EMBD_NORM = auto()
|
||||||
|
|
|
@ -608,7 +608,7 @@ class GGUFWriter:
|
||||||
|
|
||||||
def add_bos_token_id(self, id: int) -> None:
|
def add_bos_token_id(self, id: int) -> None:
|
||||||
self.add_uint32(Keys.Tokenizer.BOS_ID, id)
|
self.add_uint32(Keys.Tokenizer.BOS_ID, id)
|
||||||
|
|
||||||
def add_eos_token_id_list(self, id: Sequence[str] | Sequence[bytes] | Sequence[bytearray]) -> None:
|
def add_eos_token_id_list(self, id: Sequence[str] | Sequence[bytes] | Sequence[bytearray]) -> None:
|
||||||
self.add_array(Keys.Tokenizer.EOS_ID_LIST, id)
|
self.add_array(Keys.Tokenizer.EOS_ID_LIST, id)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue