# Can't push model to model hub

**URL:** <https://discuss.huggingface.co/t/cant-push-model-to-model-hub/77693>\
**Category:** 🤗Transformers\
**Created:** [March 16, 2024, 5:47pm UTC](https://discuss.huggingface.co/t/cant-push-model-to-model-hub/77693 "2024-03-16T17:47:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kw1018](https://avatars.discourse-cdn.com/v4/letter/k/fbc32d/32.png) [@kw1018](https://discuss.huggingface.co/u/kw1018)\
**Post date:** [March 16, 2024, 5:47pm UTC](https://discuss.huggingface.co/t/cant-push-model-to-model-hub/77693/1 "2024-03-16T17:47:52Z")

</div>

Hi Guys! Thanks in advance for any help.

I am currently fine tuning the llama2-7b base model, all went well and the model is working as excepted.

When I go to push this model to the model hub I am getting this error

ValueError: The generation config instance is invalid – `.validate()` throws warnings and/or exceptions. Fix these issues to save the configuration.

Thrown during validation:  
[UserWarning(‘`do_sample` is set to `False`. However, `temperature` is set to `0.9` – this flag is only used in sample-based generation modes. You should set `do_sample=True` or unset `temperature`.’), UserWarning(‘`do_sample` is set to `False`. However, `top_p` is set to `0.6` – this flag is only used in sample-based generation modes. You should set `do_sample=True` or unset `top_p`.’)]

I got other warnings about do\_sample so i actually decided to retrain the entire model with that config to see if it would help, that didnt work.

The files that saved are:  
“adapter\_config.json”  
“adapter\_model.safetensors”  
“config.json”

I’m a bit confused about how to call these? Is my model saved?

Basically there are two questions

1. Is there any workaround for pushing models to the model hub
2. If not can I upload and call my model using the files I’ve listed above locally?

Hope you are having a great day!  
Thanks!

---

<div class="post-metadata">

**Author:** ![balakhonoff](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/balakhonoff/32/24936_2.png) [@balakhonoff](https://discuss.huggingface.co/u/balakhonoff)\
**Post date:** [March 17, 2024, 12:00pm UTC](https://discuss.huggingface.co/t/cant-push-model-to-model-hub/77693/2 "2024-03-17T12:00:40Z")

</div>

The same issue ☹
