Skip to content

Add sequence classification support for small Gemma 3 text models#40562

Merged
zucchini-nlp merged 16 commits intohuggingface:mainfrom
abdokaseb:add_textSeqClass_gemma3
Sep 4, 2025
Merged

Add sequence classification support for small Gemma 3 text models#40562
zucchini-nlp merged 16 commits intohuggingface:mainfrom
abdokaseb:add_textSeqClass_gemma3

Conversation

@abdokaseb
Copy link
Copy Markdown
Contributor

What does this PR do?

Add Gemma3TextForSequenceClassification for Gemma3 small text models following generic practice

Testing:

  • Tested with single-node option, loss curve and AUC are all expected with no issue.
  • All testes passed
  • make fixup passed

Fixes #40554

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

Copy link
Copy Markdown
Member

@zucchini-nlp zucchini-nlp left a comment

Choose a reason for hiding this comment

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

Hey @abdokaseb , thanks for the PR! Indeed, models saved without an image tower can't be loaded with existing class, totally forgot about them

@zucchini-nlp
Copy link
Copy Markdown
Member

Failing tests are not related, a rebase might help. I will merge a PR to fix processor tests in an hour or so

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

@zucchini-nlp
Copy link
Copy Markdown
Member

@abdokaseb, the workers are crashing and thus we can't merge the PR yet. I will check what is wrong and merge when fixed

@zucchini-nlp zucchini-nlp enabled auto-merge (squash) September 2, 2025 16:10
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Sep 4, 2025

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

run-slow: auto, gemma3

@zucchini-nlp
Copy link
Copy Markdown
Member

The CI is very flaky lately 😿

@zucchini-nlp zucchini-nlp merged commit 25b4a0d into huggingface:main Sep 4, 2025
23 checks passed
@adamreichold
Copy link
Copy Markdown

The CI is very flaky lately 😿

@zucchini-nlp @abdokaseb Thank you for carrying it over the finish line nevertheless!

@ArthurZucker
Copy link
Copy Markdown
Collaborator

🤗

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.

Add sequence classification support for small Gemma 3 models

5 participants