-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
GPT2 past usage #5586
Comments
Hey @cronoik, Thanks for your issue. It does not really surprise me that the loss is different. loss = CrossEntropy( where as in the second case the following loss is calculated: loss = CrossEntropy( This is simplied - in reality the loss between the tokens of those words are calculated. Hope this answers your question |
@patrickvonplaten Thank you a lot for your answer. |
Hello! I have a question for gpt-2 lmhead model's input 'past_key_values' |
Hey @chaeyoon-jang, Could you open a new issue for this? |
Hello everyone,
I tried to answer this stackoverflow question and stumbled about a strange beheaviour I can't explain.
The following code will calculate the loss for a sentence with different single words injected:
Output:
Now I wanted to use the past parameter according to documentation and expected the same result:
but the loss is different:
Is this the intended behaviour or am I doing something wrong?
The text was updated successfully, but these errors were encountered: