-
Notifications
You must be signed in to change notification settings - Fork 28
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
Bert-based models crash #49
Comments
Hello! Thanks for listing the relevant versions. It's strange that e.g. XLM-RoBERTa do work, but BERT doesn't. That's understandably annoying - as the BERT models are quite good still. I'm not able to reproduce this I'm afraid. I have two suggestions:
Edit: I've not been able to reproduce this even with torch==2.0.0
|
Hi there, And then I get an Assertion 'srcIndex < srcSelectDimSize' failed which seems to an out-of-bounds indexing issue during tensor slicing in the CUDA kernel. I wonder if this error is connected to the document_level context. Model Config:
|
Update: |
I still have issue with above and Hasn't solve my issue. |
Hi there. Thanks for the great library!
I have one issue regarding the usage of Bert-based models. I trained different models finetuning them on my custom dataset (roberta, luke, deberta, xlm-roberta etc)
I tried to do the same using the same code but I get an error (also using your code from the getting started part of the documentation).
I am using a dataset with this format:
{"tokens": ["(7)", "On", "specific", "query", "by", "the", "Bench", "about", "an", "entry", "of", "Rs.", "1,31,37,500", "on", "deposit", "side", "of", "Hongkong", "Bank", "account", "of", "which", "a", "photo", "copy", "is", "appearing", "at", "p.", "40", "of", "assessee's", "paper", "book,", "learned", "authorised", "representative", "submitted", "that", "it", "was", "related", "to", "loan", "from", "broker,", "Rahul", "&", "Co.", "on", "the", "basis", "of", "his", "submission", "a", "necessary", "mark", "is", "put", "by", "us", "on", "that", "photo", "copy."], "ner_tags": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 21, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}
And I load it with this script:
For every other model, it works perfectly. But if I try to use a bert-based model (e.g. bert-base-uncased, bert-base-cased, legal-bert etc) it crashes returning different errors, but always linked to the forward method (sometimes is related to the normalization layer, sometimes about matmul).
This is the traceback:
Or this is another traceback (same code):
Sometimes also this one:
I know that probably is not much to work on. Let me know if you have any advice for me.
transformers==4.36.0
span-marker==1.5.0
torch==2.0.0
The text was updated successfully, but these errors were encountered: