Skip to content

Conversation

@gante
Copy link
Contributor

@gante gante commented Oct 9, 2024

What does this PR do?

Some of our forward numerical checks compare logits against expected values. #33902 removes the upcast scheduled for deprecation in forward (logits = logits.float()), resulting in significant memory savings.

However, our tests were expecting the cast. This PR is a fix for (some of) those tests. e.g. two slow tests in llama are fixed as a result of this PR.

(text search -> EXPECTED_SLICE, used in tests that compare logits against hardcoded values -> fix whenever applicable )

@gante gante requested a review from LysandreJik October 9, 2024 14:31
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

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

Sounds fair to me! Thanks @gante

@gante gante merged commit e878eaa into huggingface:main Oct 11, 2024
BernardZach pushed a commit to BernardZach/transformers that referenced this pull request Dec 5, 2024
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.

3 participants