Skip to content

Conversation

@aphedges
Copy link
Contributor

What does this PR do?

Applies #8633 to GPT-Neo.

I was getting errors like RuntimeError: Sizes of tensors must match except in dimension 2. Got 20 and 19 (The offending index is 0) during the evaluation step of Trainer.train() with GPT-Neo.

This was fixed in an internal implementation of GPTNeoForSequenceClassification by @manuelciosici before an official version of the class was released for transformers. I converted our code to use the transformers version of the class and realized the solution should be upstreamed. I'm just mentioning this here because I don't get all the credit for this patch.

This might be needed for other models as well, but I don't know of a good way to figure that out without testing them all.

Who can review?

trainer: @sgugger

Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing!

@sgugger sgugger merged commit 68b0bae into huggingface:master Sep 13, 2021
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

Successfully merging this pull request may close these issues.

2 participants