Skip to content
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

Sequence length too long for ELECTRADataProcessor. #22

Closed
PhilipMay opened this issue Apr 12, 2021 · 3 comments
Closed

Sequence length too long for ELECTRADataProcessor. #22

PhilipMay opened this issue Apr 12, 2021 · 3 comments

Comments

@PhilipMay
Copy link

I am using ELECTRADataProcessor to tokenize my corpus for pretraining (like your example sais).

I am getting this following message:

Token indices sequence length is longer than the specified maximum sequence length for this model (642 > 512). Running this sequence through the model will result in indexing errors

My question: Can this be ignored because the tokenizer cuts off the text or will it cause a crash when training? How can that be avoided?

Thanks again
Philip

@richarddwang
Copy link
Owner

This is because huggingface's tokenizer internally records maximum length its corresponding model but not itself can deal with, and check the length when tokenize. So this should be able to be ignored.

As how to avoid it, you can ask on Huggingface's forum.

@PhilipMay
Copy link
Author

So this should be able to be ignored.

So the batches you create are not more than the 512 token in length - right?

@richarddwang
Copy link
Owner

Yes, no more than max length, which is 128 under small scale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants