-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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
RuntimeError: CUDA error: CUBLAS_STATUS_NOT_INITIALIZED when calling cublasCreate(handle)
#6263
Comments
I'm getting the same issue. Curious how did you solve yours? @mt324010 |
|
Yeah, you're right. I had problem with tokenizer length in my case. |
I am getting the same error. I am trying to update the token_type_embeddings by having 4 types instead of 2.
@vdabravolski as for the tokenizer, I added special tokens and updated the length of the tokenizer and resized the model token_embeddings:
|
Could you elaborate on this? |
Try removing/deleting the cached .lock files and run again |
I think one of the possible reasons is that your padding token for token_type_id is out of range. Say you have four extra token_type_ids, then ’pad‘ , 'cls' and 'unk' may follow your tokenizer setting. BERT uses a large number for pad(100 something), then if your token_type_embedding is initialized to be only 4 class, it will result in similar error. So you might increase your token type vocabulary to consider special tokens and manually set them to 0,1,2 etc. Hope it helps. |
I had not given my model the vocab size of my tokenizer when I initialized it, which gave me this error. Running the model on the CPU (as suggested here #3090) gave me a better error message that let me figure this out, so that's a more general tip if you get this error I guess. |
Thanks @manalabssas |
Hello how did you delete all cache files ? I ma getting the same problem ? |
I changed return_token_type_ids=False |
This helped me solve my issue. I had initialized different versions of the |
Yes, this is my case. I got it solved. |
Hi @tonywenuon , may I know how did you increase your token type vocabulary? |
very useful!~ |
I solved it by reducing batch _ size. |
In my case, I had to use |
I had the same error. But later I found it is because that the CUDA driver didn't load as expected. Restart the OS resolved this problem |
In my case, a simple notebook restart helped for some odd reason. |
Thanks! |
Hi, I tried to add some other embeddings in your BertEmbedding source code and then load the pretrained weights 'bert-base-chinese'.
When I run the forward method, I got the issue
'RuntimeError: CUDA error: CUBLAS_STATUS_NOT_INITIALIZED when calling
cublasCreate(handle)
'Can someone help please? Thanks a lot
The text was updated successfully, but these errors were encountered: