EADST

Save Hugging Face Model with One Bin

max_shard_size (int or str, optional, defaults to "10GB") — Only applicable for models. The maximum size for a checkpoint before being sharded. Checkpoints shard will then be each of size lower than this size. If expressed as a string, needs to be digits followed by a unit (like "5MB").

Based on the introduction, one bin model can be saved by changing the "max_shard_size".

LlamaForCausalLM.save_pretrained(base_model, output_dir, max_shard_size="100GB") # save one bin if the model is less than 100GB

Reference

PreTrainedModel

About Me
XD
Goals determine what you are going to be.
Category
标签云
站点统计

本站现有博文242篇,共被浏览291964

本站已经建立1782天!

热门文章
文章归档
回到顶部