Skip to content

[SqueezeBert] Migrate to standardized output collection decorators#44010

Open
preetam1407 wants to merge 3 commits intohuggingface:mainfrom
preetam1407:squeezebert-output-capturing
Open

[SqueezeBert] Migrate to standardized output collection decorators#44010
preetam1407 wants to merge 3 commits intohuggingface:mainfrom
preetam1407:squeezebert-output-capturing

Conversation

@preetam1407
Copy link
Copy Markdown
Contributor

@preetam1407 preetam1407 commented Feb 15, 2026

#43979.

Refactors SqueezeBert to the standardized output collection interface:

  • Adds _can_record_outputs in SqueezeBertPreTrainedModel
  • Adds @capture_outputs on SqueezeBertModel.forward
  • Adds @can_return_tuple on task model forwards
  • Removes manual output_attentions / output_hidden_states / return_dict plumbing and manual collection loops

Who can review?

@ArthurZucker @molbap

Copy link
Copy Markdown
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

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

thanks, there is #43590 running I'd like to merge it first

output_attentions=output_attentions,
output_hidden_states=output_hidden_states,
return_dict=return_dict,
return_dict=True,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

you should never have to do this, can_return_tuple does it!

Copy link
Copy Markdown
Contributor Author

@preetam1407 preetam1407 Feb 25, 2026

Choose a reason for hiding this comment

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

ohh..! thanks @ArthurZucker
updated!

@github-actions
Copy link
Copy Markdown
Contributor

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

run-slow: squeezebert

@preetam1407 preetam1407 requested a review from ArthurZucker March 2, 2026 13:04
Copy link
Copy Markdown
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

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

LGTM, merge_with_config_defaults needs to appear somewhere (was an update) at the top level so at PreTrainedModel levels when neeeded

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