Open SerenaTetart opened 1 month ago
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!
I had the same issue with the version of transformers 4.38.2. Dowgrading transformers to the version 4.25.1 solved the issue!
@svchostdotexe the 2nd reason why you're getting this error might be because you have too much text or token in your training set
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
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