Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Donut generate ONLY <s><s>...<s></s> #303

Open
SerenaTetart opened this issue May 23, 2024 · 5 comments
Open

Donut generate ONLY <s><s>...<s></s> #303

SerenaTetart opened this issue May 23, 2024 · 5 comments

Comments

@SerenaTetart
Copy link

SerenaTetart commented May 23, 2024

After training the model, I have a normal training and validation loss decreasing over each epoch, only to return during generation the same token:
text_sequence: <s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s>...<s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s><s></s>

Edit: I solved it by using transformer version 4.40.2

@svchostdotexe
Copy link

svchostdotexe commented May 26, 2024

that solved it for you? i have the same issue, but when i upgrade to 4.40.2 i get the following error:
TypeError: prepare_inputs_for_inference() got an unexpected keyword argument 'cache_position'

could you be so kind and post all your installed lib versions? (pip list and conda list)

edit: introducing the "cache_position" as an argument fixes the issue, now i can train the model with transformer==4.40.2! sadly that does not fix the <s><s><s><s><s><s> issue for me. any help would be greatly appreciated!

@DriraYosr
Copy link

I had the same issue with the version of transformers 4.38.2. Dowgrading transformers to the version 4.25.1 solved the issue!

@SerenaTetart
Copy link
Author

@svchostdotexe the 2nd reason why you're getting this error might be because you have too much text or token in your training set

@nromero125
Copy link

Im having the same issue, I tried with multiple versions of transformers and result in the same. I was following this article https://medium.com/@paul_lefevre/information-extraction-from-id-documents-with-donut-792ca80d2a93

@Ruxin124
Copy link

Ruxin124 commented Aug 5, 2024

@nromero125 Have you solved the problem? i follow the same resource as you, and get the same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants