from transformers import AutoModel model = AutoModel.from_pretrained("./") model.save_pretrained('./', max_shard_size="5GB")