# Model saving results in a small size checkpoint

**URL:** <https://discuss.huggingface.co/t/model-saving-results-in-a-small-size-checkpoint/3035>\
**Category:** 🤗Transformers\
**Created:** [January 3, 2021, 5:57pm UTC](https://discuss.huggingface.co/t/model-saving-results-in-a-small-size-checkpoint/3035 "2021-01-03T17:57:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![abdallah197](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/abdallah197/32/3973_2.png) [@abdallah197](https://discuss.huggingface.co/u/abdallah197)\
**Post date:** [January 3, 2021, 5:57pm UTC](https://discuss.huggingface.co/t/model-saving-results-in-a-small-size-checkpoint/3035/1 "2021-01-03T17:57:40Z")

</div>

Hi Community

I am trying to save a checkpoint in a costume Model using `model.save_pretrained()` after each epoch. the .bin directory however will contain a config and weights file, the weights file is only 98 MB no matter how big or small I change the configs and the data size. At the same time, saving the model using `torch.save()` results in a reasonable `pth` file that would be around 600MB. is there any requirements or extra parameters to use for the save\_pretrained() function?

---

<div class="post-metadata">

**Author:** ![valhalla](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/valhalla/32/4179_2.png) [@valhalla](https://discuss.huggingface.co/u/valhalla)\
**Post date:** [January 4, 2021, 5:58am UTC](https://discuss.huggingface.co/t/model-saving-results-in-a-small-size-checkpoint/3035/2 "2021-01-04T05:58:52Z")

</div>

Hard to say anything without looking at the code. Could you post a small code snippet?
