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

translate_iterable is not properly handling max_input_length #1646

Open
winstxnhdw opened this issue Mar 24, 2024 · 2 comments
Open

translate_iterable is not properly handling max_input_length #1646

winstxnhdw opened this issue Mar 24, 2024 · 2 comments

Comments

@winstxnhdw
Copy link

Even after setting max_input_length = 0, I get the following warning when exceeding 1024.

RuntimeError: No position encodings are defined for positions >= 1024, but got position 1116
@minhthuc2502
Copy link
Collaborator

What kind of model did you use? If the encodings variable exists in the model , the length of position encodings will be fixed, so you would have this error. Otherwise, we will create position encodings matrix based on the length of the input.

@winstxnhdw
Copy link
Author

I am using NLLB and it seems you are right. The tokenizer_config.json has set model_max_length to 1024.

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