Closed ClayGraubard closed 3 years ago
Hi Clay,
Thanks for your interest in our work!
Unfortunately I wasn't able to reproduce the errors you mentioned. I tested the script on my Windows 10 laptop as well as on a Google Colab notebook; it works without issue regardless of whether CPU or GPU is used. Did you have the same version of pytorch (1.3.1)
and transformer (2.3.0)
module installed?
Regarding the first warning you saw, the unused weights, i.e. ['similarity_loss_factor', 'ranking_loss_factor', 'similarity_linear.weight', 'similarity_linear.bias']
are historical artifacts from our development code base. We tried different ways of modifying BERT for WSD and those leftover weights are part of our failed experiments. They are not used in the final version of the pretrained models so the warning can be safely ignored :)
Hey BPYap,
It appears I resolved my issues, and let's just say a whole lot of stupidity (or tiredness) played a role here :)
So yeah, it works now. Thank you!
When trying to run the demo, I've run into three issues.
Firstly, when I run demo_model.py with any pre-trained model (in this case, bert_large-batch_size=128...), I get the following warning:
Then, when I run it with my CPU using the test sentence "He caught a [TGT] bass [TGT] yesterday.", it throws an error:
Finally, if I run it with my GPU (2080 Ti), it throws a ton of errors reading " Assertion
srcIndex < srcSelectDimSize
failed." It ends with this error: "RuntimeError: CUDA error: CUBLAS_STATUS_NOT_INITIALIZED when callingcublasCreate(handle)
"Was wondering if you had any fixes to get it working. Thanks a ton!
Edit: Running just "bert-large-uncased" worked. Is there a way to still use the pre-trained models included?