# Problem on inference using peft and DonUT

**URL:** <https://discuss.huggingface.co/t/problem-on-inference-using-peft-and-donut/78799>\
**Category:** 🤗Transformers\
**Created:** [March 26, 2024, 3:40pm UTC](https://discuss.huggingface.co/t/problem-on-inference-using-peft-and-donut/78799 "2024-03-26T15:40:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Edgar404](https://avatars.discourse-cdn.com/v4/letter/e/d26b3c/32.png) [@Edgar404](https://discuss.huggingface.co/u/Edgar404)\
**Post date:** [March 26, 2024, 3:40pm UTC](https://discuss.huggingface.co/t/problem-on-inference-using-peft-and-donut/78799/1 "2024-03-26T15:40:13Z")

</div>

I trained a DonUT model to perform document extraction from receipt , after the training i tested the accuracy and everything was fine so i pushed the tokenizer and the model to hub

But when i call it from hub the model behave as if it was never trained , the results are not even coherents . This happens only with the peft finetuned model . I have done a full finetuning just before and everything is fine

[Link to the source code](https://www.kaggle.com/code/edgarmevaa/full-finetuning-of-donut-on-numeric-data/edit)
