MCPcopy Create free account
hub / github.com/Alpha-VLLM/LLaMA2-Accessory / save

Method save

accessory/model/tokenizer.py:117–122  ·  view source on GitHub ↗
(self, save_dir: str)

Source from the content-addressed store, hash-verified

115 return self.tokenizer.decode(t)
116
117 def save(self, save_dir: str):
118 if self.tokenizer_type == "transformers":
119 self.tokenizer.save_pretrained(save_dir)
120 else:
121 with open(Path(save_dir)/"tokenizer.model", 'wb') as f:
122 f.write(self.tokenizer.serialized_model_proto())
123
124 @ property
125 def n_words(self):

Callers 9

mainFunction · 0.80
mainFunction · 0.80
calculate_weight_deltaFunction · 0.80
merge_weights_and_saveFunction · 0.80
write_model_weightsFunction · 0.80
_save_modelFunction · 0.80
_save_optimizerFunction · 0.80
_save_otherFunction · 0.80
_save_rank_specificFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected