Different sentiment class probabilities for sequential processing vs batch processing
System Info
platform: windows python: 3.7 transformers: latest Model: finetuned BERT (from cardiffnlp/twitter-roberta-base-sentiment)
I have posted the issue here https://discuss.huggingface.co/t/different-sentiments-when-texts-processed-in-batches-vs-singles/19462, but didn't receive any answer. The behavior is not really explainable and might look like a bug.
Cheers
@LysandreJik
Who can help?
No response
Information
- [X] The official example scripts
- [ ] My own modified scripts
Tasks
- [ ] An officially supported task in the
examplesfolder (such as GLUE/SQuAD, ...) - [X] My own task or dataset (give details below)
Reproduction
see description under the above link.
Expected behavior
I would expect the class probabilities to be equal for a given text, no matter if the classification is done sequentially or in batches.
Hi @Kayne88 -- could you please share a complete script for reproducibility? In your original script you were missing the definition of tokenizer and model :)
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.