iPieter / RobBERT

A Dutch RoBERTa-based language model
https://pieter.ai/robbert/
MIT License
196 stars 29 forks source link

ValueError loading RobBERT #27

Closed Jaspernwd closed 3 years ago

Jaspernwd commented 3 years ago

Hi all,

I am using RobBERT for a Dutch sequence classification task. Everything worked well (more than 100 times), But now all of a sudden the model does not load anymore.

Downloading the model using: model = TFRobertaForSequenceClassification.from_pretrained("pdelobelle/robbert-v2-dutch-base", num_labels = 9)

I get the following error:

ValueError: cannot reshape array of size 30708480 into shape (40000,768)

I am using gp_minimize (function from scikit-optimize), it has worked for many times before this has happened. I added print functions before and after the code lines of the function that gp_minimize tries to optimize, and found out that the problem really is in downloading the model using the code line above.

Please help me, I was about to do the final tests for my thesis. My deadline is next week.

Jaspernwd commented 3 years ago

Tried on another Google colab account, issue persists.

iPieter commented 3 years ago

Thanks for notifying us of this issue. We changed the config.json earlier today to improve support for the SimpleTransformers library and are in the progress of uploading a TF version that should be compatible. The Pytorch version was updated just now.

This should be fixed in ~10 min. Sorry for the inconvenience.

Jaspernwd commented 3 years ago

Thanks so much! That's amazing. Thanks for the quick reply!!

Jaspernwd commented 3 years ago

Got a little stressed there for a second.

iPieter commented 3 years ago

The TF model should be updated now as well. Could you validate this (with from_pretrained(..., force_download=True to make sure the new weights are downloaded)?

PS: I'm always happy to hear what you are using RobBERT for 🙂

Jaspernwd commented 3 years ago

Can confirm that it works again! Thanks for the help!

I am doing my thesis for the master's in data science. I researched involved the creation of an annotated Dutch emotion corpus. 16 volunteers helped in the annotation of text that was scraped from Reddit & Trustpilot. With RobBERT I want to establish a benchmark emotion classification performance. I am doing a bayesian search for HP's. The amount of utterances in my corpus is quite low.. So I'm impressed that the model still performs! Thanks for creating this!

iPieter commented 3 years ago

Happy to hear and that sounds like an interesting project, good luck!

I'll close this issue, since the migration is now complete.