Skip to content

Migrate GPT2 to standardized output capture decorators - #43983

Merged
ArthurZucker merged 6 commits into
huggingface:mainfrom
Aki-07:ak/gpt2-standardized-outputs
Feb 18, 2026
Merged

Migrate GPT2 to standardized output capture decorators#43983
ArthurZucker merged 6 commits into
huggingface:mainfrom
Aki-07:ak/gpt2-standardized-outputs

Conversation

@Aki-07

@Aki-07 Aki-07 commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes #43979

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • 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 make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

@ArthurZucker @Cyrilvallez

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@Aki-07
Aki-07 force-pushed the ak/gpt2-standardized-outputs branch from fbc8efc to 1458ec2 Compare February 13, 2026 18:30
@Aki-07
Aki-07 force-pushed the ak/gpt2-standardized-outputs branch from cc0357c to 96588f6 Compare February 14, 2026 09:47
@Rocketknight1

Copy link
Copy Markdown
Member

cc @molbap

Comment on lines +400 to +401
kwargs.pop("output_attentions", None)
kwargs.pop("output_hidden_states", None)

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.

this should not be needed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed these two kwargs. Thanks for catching this

output_attentions: bool | None = None,
output_hidden_states: bool | None = None,
return_dict: bool | None = None,
**kwargs,

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.

would be nice to type them

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

@github-actions

Copy link
Copy Markdown
Contributor

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

run-slow: decision_transformer, gpt2

@Aki-07
Aki-07 force-pushed the ak/gpt2-standardized-outputs branch from 1f40dbf to 0403db9 Compare February 17, 2026 18:53

@ArthurZucker ArthurZucker left a comment

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.

ty!

@ArthurZucker
ArthurZucker enabled auto-merge (squash) February 18, 2026 10:33
@ArthurZucker
ArthurZucker merged commit 3689287 into huggingface:main Feb 18, 2026
25 checks passed
@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

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.

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.

Call to contributions: refactor output tracing in transformers

4 participants