from transformers import AutoModel
model = AutoModel.from_pretrained("google-bert/bert-base-cased")

If you save it using [~PreTrainedModel.save_pretrained], you will get a new folder with two files: the config of the model and its weights:

import os
import tempfile
with tempfile.TemporaryDirectory() as tmp_dir:
     model.save_pretrained(tmp_dir)
     print(sorted(os.listdir(tmp_dir)))
['config.json', 'pytorch_model.bin']

Now let's use a maximum shard size of 200MB: