Closed Dabnis closed 9 months ago
Hello,
Curious if you ever found a solution to this? I am getting the same error with a text encoding model on mac.
I am also having this issue, I see a spike to ~20GB of RAM then this crash, I tried it on a VM with much more RAM and it still crashed with ~20GB of RAM so it is not an out of memory issue as I initially thought it might be. I am working on trying to find a simplified example of the crash.
I have the same issue on both Mac M1 and Linux AMD 64
It does seem to be related to the input string length. I seem to be getting this issue around ~1,100 characters of input.
In my case the problem was caused by exceeding the sequence length of the underlying BERT model which was 512 for the particular model I was using. I got around this issue by tokenizing the string directly using the model's Tokenize
function (not forgetting to add special tokens), truncating the token slice and then passing the token slice to the model's Encode
function.
Truncating the string directly will sometimes solve the issue because sometimes a string of a certain length, say 1000, will tokenize to a slice under the max sequence length and sometimes not, depending on the string.
It should be solved in HEAD
System Info: Processor: Ryzen 7, 8 core RAM: 32Gb OS: Ubuntu 20.4 GO: 1.19.3
I am using the question&answer example, when I increase the size of the text to analyse (passage) I get failures as below:
panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x751d32]
goroutine 1340 [running]: github.com/nlpodyssey/spago/ag.Node.Value({0x0, 0x0})