# AttributeError: 'CustomQwen3Model' object has no attribute 'config'

**URL:** <https://discuss.huggingface.co/t/attributeerror-customqwen3model-object-has-no-attribute-config/155479>\
**Category:** 🤗Transformers\
**Created:** [May 16, 2025, 6:41am UTC](https://discuss.huggingface.co/t/attributeerror-customqwen3model-object-has-no-attribute-config/155479 "2025-05-16T06:41:33Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [May 16, 2025, 9:51am UTC](https://discuss.huggingface.co/t/attributeerror-customqwen3model-object-has-no-attribute-config/155479/2 "2025-05-16T09:51:28Z")

</div>

Hmm… Maybe it’s because it doesn’t inherit `PreTrainedModel`…

> [@Problem with push\_to\_hub](https://discuss.huggingface.co/t/problem-with-push-to-hub/8273):
>
> Hello everyone. I’m trying to upload my fine-tuned GPT-2 Model to Model Hub. When I try to use the uploading function push\_to\_hub I get the following error: AttributeError: 'GPT2Model' object has no attribute 'push\_to\_hub' In the documentation it says that I can push the model with this function. Can anybody help please?

> [@'GPT2LMHeadModel' object has no attribute 'push\_to\_hub'](https://discuss.huggingface.co/t/gpt2lmheadmodel-object-has-no-attribute-push-to-hub/11566):
>
> Hello everybody, I recently fine-tuned a GPT model (GPT2LMHeadModel) and tried to push it to hub. I followed the tutorial but got this strange error: ‘GPT2LMHeadModel’ object has no attribute ‘push\_to\_hub’ I’ve updated the transformers library to the latest version, as shown in the screenshot. Can anybody help me with that? I’ve been working on this problem for 3 hours but still in vain… (By the way I was coding on Kaggle) Any help is appreciated!

> **[Create a custom architecture](https://huggingface.co/docs/transformers/main/en/create_a_model)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

---

_[View the full topic](https://discuss.huggingface.co/t/attributeerror-customqwen3model-object-has-no-attribute-config/155479)._
