Skip to content

Remove generic output_attentions warning - #42333

Closed
Aravind-11 wants to merge 37 commits into
huggingface:mainfrom
Aravind-11:remove_warnings
Closed

Aravind-11 wants to merge 37 commits into
huggingface:mainfrom
Aravind-11:remove_warnings

Conversation

@Aravind-11

@Aravind-11 Aravind-11 commented Nov 22, 2025 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Removes the overly broad generic warning for output_attentions=True that was added in #40597. This warning incorrectly flagged custom AttentionInterface backends that properly return attention weights.

Fixes #41924

Changes

Removed from src/transformers/utils/generic.py (lines ~1013-1025):

  • Generic warning that fired for ALL non-eager attention implementations

Before submitting

  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you write any new necessary tests?

Who can review?

@Aravind-11 Aravind-11 closed this Nov 22, 2025
@github-actions

Copy link
Copy Markdown
Contributor

[For maintainers] Suggested jobs to run (before merge)

run-slow: owlvit

@Aravind-11
Aravind-11 deleted the remove_warnings branch November 22, 2025 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants