# Any model's size is huge when saved as opposed to downloading from hub pretrained

**URL:** <https://discuss.huggingface.co/t/any-models-size-is-huge-when-saved-as-opposed-to-downloading-from-hub-pretrained/73436>\
**Category:** 🤗Transformers\
**Created:** [February 16, 2024, 7:42am UTC](https://discuss.huggingface.co/t/any-models-size-is-huge-when-saved-as-opposed-to-downloading-from-hub-pretrained/73436 "2024-02-16T07:42:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Exterro](https://avatars.discourse-cdn.com/v4/letter/e/e19adc/32.png) [@Exterro](https://discuss.huggingface.co/u/Exterro)\
**Post date:** [February 16, 2024, 7:42am UTC](https://discuss.huggingface.co/t/any-models-size-is-huge-when-saved-as-opposed-to-downloading-from-hub-pretrained/73436/1 "2024-02-16T07:42:39Z")

</div>

Hi, I have noticed that when i download a model say falcon 1b, the size of the bin file downloaded is 2.63 gb, but when i try to save the same thing using model.save\_pretrained() the size is ~ 5gb. Any idea why ?

---

<div class="post-metadata">

**Author:** ![Exterro](https://avatars.discourse-cdn.com/v4/letter/e/e19adc/32.png) [@Exterro](https://discuss.huggingface.co/u/Exterro)\
**Post date:** [February 16, 2024, 2:39pm UTC](https://discuss.huggingface.co/t/any-models-size-is-huge-when-saved-as-opposed-to-downloading-from-hub-pretrained/73436/2 "2024-02-16T14:39:45Z")

</div>

The speed is also slower as opposed to the original model downloaded when full finetuned. (no lora)

---

<div class="post-metadata">

**Author:** ![Exterro](https://avatars.discourse-cdn.com/v4/letter/e/e19adc/32.png) [@Exterro](https://discuss.huggingface.co/u/Exterro)\
**Post date:** [February 17, 2024, 2:07pm UTC](https://discuss.huggingface.co/t/any-models-size-is-huge-when-saved-as-opposed-to-downloading-from-hub-pretrained/73436/3 "2024-02-17T14:07:29Z")

</div>

When loading into cuda directly with from\_pretrained the issue goes away. It loads and saves with the same memory and tok speed.

The problem arises when u dont map to device default and then move it to cuda using model.to(device=“cuda”)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/hellohellohello/original/2X/d/de4155eb4aa4108ecb32a1389d7cc37ae69f88b7.png) [@system](https://discuss.huggingface.co/u/system)\
**Post date:** [February 18, 2024, 2:08am UTC](https://discuss.huggingface.co/t/any-models-size-is-huge-when-saved-as-opposed-to-downloading-from-hub-pretrained/73436/4 "2024-02-18T02:08:03Z")

</div>

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.
