# Fine-tuning a Fine-tuned Model

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffine-tuning-a-fine-tuned-model%2F45571%3E%5C
**Category:** Models\
**Created:** [July 4, 2023, 7:21am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffine-tuning-a-fine-tuned-model%2F45571 "2023-07-04T07:21:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![raygx](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/raygx/32/17328_2.png) [@raygx](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fraygx)%5C
**Post date:** [July 4, 2023, 7:21am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffine-tuning-a-fine-tuned-model%2F45571%2F1 "2023-07-04T07:21:40Z")

</div>

[@everyone](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fgroups%2Feveryone)%2C @sgugger  
I want to fine-tune a TextClassification Model previously fine-tuned for x number of classes to a new model with y number of classes.  
Model didn’t allow to change label2id and id2label config parameter.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![raygx](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/raygx/32/17328_2.png) [@raygx](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fraygx)%5C
**Post date:** [July 5, 2023, 12:31am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffine-tuning-a-fine-tuned-model%2F45571%2F2 "2023-07-05T00:31:06Z")

</div>

found solution to this… This question was already asked… forgot the exact post.  
Solution is to pass following argument in the from\_pretrained() function call.

> ignore\_mismatched\_sizes=True

Thanks anyways… can be closed now
