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
Add vocabulary gives sequence length warning #1533
Comments
|
Hi, this warning means that the sequence you have encoded is longer than the maximum sequence length the model can handle. It isn't related to the tokens you have added. RoBERTa can only handle sequences of a maximum of 512 tokens, so you should make sure you only pass sequences of a max length of 512 or else it will crash. You can truncate your sequence so that it fits, or you can use another model that can accept longer sequences. |
Thanks! My bad, completely misunderstood the warning, all fixed. However, my problem now seems to be that the function For example, starting with a tokenizer vocabulary size of 50265, the |
|
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I'm trying to add extra vocabulary to RoBERTa using the
tokenizer.add_tokens()function. However, when training I get the following warning message:WARNING - transformers.tokenization_utils - Token indices sequence length is longer than the specified maximum sequence length for this model (751 > 512). Running this sequence through the model will result in indexing errorsWhat's going on here? Should I be concerned about this or should I ignore it? The function that calls this error is
tokenizer.convert_tokens_to_ids().The text was updated successfully, but these errors were encountered: