Skip to content

Upgrade to Transformers v4.55#2209

Merged
regisss merged 33 commits into
mainfrom
transformers_future
Sep 3, 2025
Merged

Upgrade to Transformers v4.55#2209
regisss merged 33 commits into
mainfrom
transformers_future

Conversation

@regisss
Copy link
Copy Markdown
Collaborator

@regisss regisss commented Aug 18, 2025

What does this PR do?

Aligning the codebase with Transformers v4.55.2.

Known issues:

  • text-generation tests are failing for a few models

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

@pbielak
Copy link
Copy Markdown
Collaborator

pbielak commented Aug 19, 2025

@regisss What do you think about moving changes related to:

  1. huggingface-cli login -> hf auth login
  2. type hints
  3. typos, removed comments
    into separate commits/PRs? It would make it easier to review the actual changes coming from the transformers upgrade

If you agree, I could prepare such PRs and then this branch could be rebased

@regisss
Copy link
Copy Markdown
Collaborator Author

regisss commented Aug 19, 2025

@pbielak I don't have a strong opinion on this, go ahead if you prefer reviewing a shorter PR 🙂

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

- add new args token_idx
"""

if (input_ids is None) ^ (inputs_embeds is not 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.

Should this be removed?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It's done in PaliGemmaModel: https://github.com/huggingface/transformers/blob/v4.55.4/src/transformers/models/paligemma/modeling_paligemma.py#L324
But I expect this model to fail and to require a fix, I need to run the tests.

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.

So if it's in the upstream, why is it removed here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

What I mean is that the upstream now does it in the class PaliGemmaModel and not in PaliGemmaForConditionalGeneration anymore. That's why I'm removing it from GaudiPaliGemmaForConditionalGeneration.

@schoi-habana schoi-habana mentioned this pull request Aug 22, 2025
3 tasks
@regisss regisss marked this pull request as ready for review September 3, 2025 15:14
@regisss
Copy link
Copy Markdown
Collaborator Author

regisss commented Sep 3, 2025

Merging as discussed with @astachowiczhabana. Will solve known ongoing issues in new PRs.

@regisss regisss merged commit c0fa320 into main Sep 3, 2025
5 of 9 checks passed
astachowiczhabana pushed a commit that referenced this pull request Sep 4, 2025
Co-authored-by: IlyasMoutawwakil <ilyas.moutawwakil@gmail.com>
@astachowiczhabana
Copy link
Copy Markdown
Collaborator

LGTM

astachowiczhabana pushed a commit that referenced this pull request Sep 17, 2025
Co-authored-by: IlyasMoutawwakil <ilyas.moutawwakil@gmail.com>
@regisss regisss mentioned this pull request Sep 25, 2025
3 tasks
gplutop7 pushed a commit to HabanaAI/optimum-habana-fork that referenced this pull request Oct 15, 2025
Co-authored-by: regisss <15324346+regisss@users.noreply.github.com>
Co-authored-by: IlyasMoutawwakil <ilyas.moutawwakil@gmail.com>
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.

6 participants