Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate modeling_utils.py classes #37298

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

qubvel
Copy link
Member

@qubvel qubvel commented Apr 4, 2025

What does this PR do?

Classes such as PoolerStartLogits, PoolerEndLogits, PoolerAnswerClass, SQuADHead, and SequenceSummary are:

  1. Defined in modeling_utils.py, which is somewhat against the main repository philosophy of having classes defined within dedicated modeling files
  2. Used by a few older models and not used by newer ones

Following the above, I have transferred them to the corresponding modeling files and deprecated those in modeling_utils.py. This should unclutter modeling_utils.py and make it easier to remove those classes when models are going to be deprecated.

@qubvel
Copy link
Member Author

qubvel commented Apr 4, 2025

run-slow: gpt2, xlm, xlnet, electra

Copy link

github-actions bot commented Apr 4, 2025

This comment contains run-slow, running the specified jobs: This comment contains run-slow, running the specified jobs:

models: ['models/gpt2', 'models/xlm', 'models/xlnet']
quantizations: [] ...

@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.

@qubvel qubvel marked this pull request as ready for review April 7, 2025 17:59
@qubvel qubvel requested a review from Rocketknight1 April 7, 2025 17:59
@qubvel
Copy link
Member Author

qubvel commented Apr 10, 2025

cc @Rocketknight1 when you have bandwidth

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