Skip to content

Conversation

@ydshieh
Copy link
Collaborator

@ydshieh ydshieh commented Jun 26, 2025

What does this PR do?

With #39016, this test

tests/generation/test_utils.py::GenerationIntegrationTests::test_compare_unprocessed_logit_scores

is failing.

However, the difference is in the range of 1e-7

(Pdb) torch.amax(torch.abs(logits_fwd - logits_gen))
tensor(5.9605e-08, device='cuda:0')

The test was using assertListEqual which is not good for float numbers.

@ydshieh ydshieh requested a review from zucchini-nlp June 26, 2025 09:57
@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.

@ydshieh ydshieh requested a review from vasqu June 26, 2025 16:02
Copy link
Contributor

@vasqu vasqu left a comment

Choose a reason for hiding this comment

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

Thx :)

@ydshieh ydshieh merged commit 23b7e73 into main Jun 26, 2025
21 checks passed
@ydshieh ydshieh deleted the fix_test_compare_unprocessed_logit_scores branch June 26, 2025 16:36
zaristei pushed a commit to zaristei/transformers that referenced this pull request Sep 9, 2025
fix

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
zaristei pushed a commit to zaristei/transformers that referenced this pull request Sep 9, 2025
fix

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
zaristei pushed a commit to zaristei/transformers that referenced this pull request Sep 9, 2025
fix

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
zaristei pushed a commit to zaristei/transformers that referenced this pull request Sep 9, 2025
fix

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
zaristei pushed a commit to zaristei/transformers that referenced this pull request Sep 9, 2025
fix

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
zaristei pushed a commit to zaristei/transformers that referenced this pull request Sep 9, 2025
fix

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
zaristei pushed a commit to zaristei/transformers that referenced this pull request Sep 9, 2025
fix

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
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.

4 participants