# Defog sqlcoder model download

**URL:** <https://discuss.huggingface.co/t/defog-sqlcoder-model-download/106110>\
**Category:** 🤗Transformers\
**Created:** [September 10, 2024, 5:43am UTC](https://discuss.huggingface.co/t/defog-sqlcoder-model-download/106110 "2024-09-10T05:43:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![akbarmq01](https://avatars.discourse-cdn.com/v4/letter/a/ce73a5/32.png) [@akbarmq01](https://discuss.huggingface.co/u/akbarmq01)\
**Post date:** [September 10, 2024, 5:43am UTC](https://discuss.huggingface.co/t/defog-sqlcoder-model-download/106110/1 "2024-09-10T05:43:10Z")

</div>

Hi there,  
I was trying to download defog/sqlcoder models. I was able to successfully load it:  
"  
from transformers import AutoTokenizer, AutoModelForCausalLM  
tokenizer = AutoTokenizer.from\_pretrained(“defog/sqlcoder-7b-2”)  
model = AutoModelForCausalLM.from\_pretrained(“defog/sqlcoder-7b-2”)  
"  
But when I try to save the model, it gives errors. I checked with official defog page and got suggestion to raise it here since there seems to be some issue in transformers library. Can you please help. Thanks

---

<div class="post-metadata">

**Author:** ![nielsr](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/nielsr/32/39617_2.png) [@nielsr](https://discuss.huggingface.co/u/nielsr)\
**Post date:** [September 10, 2024, 7:35am UTC](https://discuss.huggingface.co/t/defog-sqlcoder-model-download/106110/2 "2024-09-10T07:35:11Z")

</div>

Can you please showcase which error you’re getting?

---

<div class="post-metadata">

**Author:** ![akbarmq01](https://avatars.discourse-cdn.com/v4/letter/a/ce73a5/32.png) [@akbarmq01](https://discuss.huggingface.co/u/akbarmq01)\
**Post date:** [September 10, 2024, 8:30am UTC](https://discuss.huggingface.co/t/defog-sqlcoder-model-download/106110/3 "2024-09-10T08:30:01Z")

</div>

There is no verbose error. I when I execute line “model.save\_pretrained()”. it says “killed” on terminal. Thats it

---

<div class="post-metadata">

**Author:** ![nielsr](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/nielsr/32/39617_2.png) [@nielsr](https://discuss.huggingface.co/u/nielsr)\
**Post date:** [September 10, 2024, 8:38am UTC](https://discuss.huggingface.co/t/defog-sqlcoder-model-download/106110/4 "2024-09-10T08:38:30Z")

</div>

This might be an issue related to your environment, perhaps you’re constrained on memory.

Note that calling `model = AutoModelForCausalLM.from_pretrained(“defog/sqlcoder-7b-2”)` requires about 14GB of space on your disk.

Could you try this on Google Colab and see if the same error occurs? If not, then it’s related to your machine.

---

<div class="post-metadata">

**Author:** ![akbarmq01](https://avatars.discourse-cdn.com/v4/letter/a/ce73a5/32.png) [@akbarmq01](https://discuss.huggingface.co/u/akbarmq01)\
**Post date:** [September 10, 2024, 10:22am UTC](https://discuss.huggingface.co/t/defog-sqlcoder-model-download/106110/5 "2024-09-10T10:22:17Z")

</div>

Hi @nielsr. Yes I do have enough mem space. I did try saving a model of similar size and it did save it successfully. Not sure why this happened. I am using RTX4090 card
