You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I enter a long code snippet, I get an error like this: “IndexError: The shape of the mask [425] at index 0 does not match the shape of the indexed tensor [413, 768] at index 0”. Does this mean that the maximum input length supported by the model configuration is 413 tokens? I was wondering if the API could be further refined to support arbitrary length or automatic truncation.
The text was updated successfully, but these errors were encountered:
Hi @lenijwp ,
Thank you for your interest in our work!
Our code supports unlimited inputs, by chunking long inputs and encoding each chunks separately.
However, 413 tokens do not even require this chunking, because the models' input size is 512.
Can you check whether there's a "newline" character at the end of the input?
If so, can you remove it and check again?
If not, can you provide us with the problematic inputs?
I checked as you suggested and removed the trailing whitespaces and newline characters from the input. The problem has been solved. Thank you for your timely and helpful assistance!
On Mon, Mar 6, 2023 at 21:36 Lenic Jiang ***@***.***> wrote:
I checked as you suggested and removed the trailing whitespaces and
newline characters from the input. The problem has been solved. Thank you
for your timely and helpful assistance!
—
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADSOXMFM25KOPJOEGCP2BZTW22NLXANCNFSM6AAAAAAVR4DRTE>
.
You are receiving this because you commented.Message ID:
***@***.***>
When I enter a long code snippet, I get an error like this: “IndexError: The shape of the mask [425] at index 0 does not match the shape of the indexed tensor [413, 768] at index 0”. Does this mean that the maximum input length supported by the model configuration is 413 tokens? I was wondering if the API could be further refined to support arbitrary length or automatic truncation.
The text was updated successfully, but these errors were encountered: