Skip to content

feat: upgrade to transformers v5#659

Merged
dushyantbehl merged 21 commits intofoundation-model-stack:mainfrom
yash4242:yash-tfv5
Mar 9, 2026
Merged

feat: upgrade to transformers v5#659
dushyantbehl merged 21 commits intofoundation-model-stack:mainfrom
yash4242:yash-tfv5

Conversation

@yash4242
Copy link
Copy Markdown
Contributor

@yash4242 yash4242 commented Feb 24, 2026

Description of the change

Making fms-hf-tuning transformers v5 compatible

Related issue number

NA

How to verify the PR

run tests. As of now, some tests fail, most of which are due to a tensor size mismatch. This error comes inside the trainer.train() code

Was the PR tested

Yes.

  • I have added >=1 unit test(s) for every new method I have added.
  • I have ensured all unit tests pass
    Tests status as above. I tested out with 9 pytests as follows:
pytest tests/acceleration
pytest tests/build
pytest tests/data
pytest tests/trackers
pytest tests/trainercontroller
pytest tests/utils
pytest tests/test_sft_trainer.py

@github-actions
Copy link
Copy Markdown

Thanks for making a pull request! 😃
One of the maintainers will review and advise on the next steps.

@dushyantbehl dushyantbehl changed the title Yash tfv5 feat: upgrade to transformers v5 Feb 24, 2026
@github-actions github-actions Bot added the feat label Feb 24, 2026
…xtToText

Signed-off-by: Yash Mehan <yashmehan@gmail.com>
…_tokens_seen

Signed-off-by: Yash Mehan <yashmehan@gmail.com>
…d llama tokenizer

Signed-off-by: Yash Mehan <yashmehan@gmail.com>
Signed-off-by: Yash Mehan <yashmehan@gmail.com>
Comment thread tests/build/test_launch_script.py Outdated
Comment thread tests/utils/test_embedding_resize.py
dushyantbehl and others added 7 commits February 24, 2026 22:07
Signed-off-by: Yash Mehan <yashmehan@gmail.com>
Signed-off-by: Yash Mehan <yashmehan@gmail.com>
…k case

Signed-off-by: Yash Mehan <yashmehan@gmail.com>
Signed-off-by: Yash Mehan <yashmehan@gmail.com>
…ay, adding justification for what was renamed

Signed-off-by: Yash Mehan <yashmehan@gmail.com>
Signed-off-by: Yash Mehan <yashmehan@gmail.com>
@dushyantbehl dushyantbehl marked this pull request as ready for review February 26, 2026 11:29
Signed-off-by: Yash Mehan <yashmehan@gmail.com>
Signed-off-by: Yash Mehan <71321431+yash4242@users.noreply.github.com>
Comment thread tests/utils/test_embedding_resize.py Outdated
Comment thread tests/utils/test_embedding_resize.py Outdated
Comment thread tests/test_sft_trainer.py Outdated
Comment thread tests/test_sft_trainer.py Outdated
Comment thread tuning/data/tokenizer_utils.py Outdated
Comment thread pyproject.toml Outdated
Comment thread pyproject.toml Outdated
Comment thread pyproject.toml Outdated
Comment thread pyproject.toml Outdated
Copy link
Copy Markdown
Collaborator

@dushyantbehl dushyantbehl left a comment

Choose a reason for hiding this comment

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

Delete commented code...retain comments only in code files and not in test files.
fix the pyproject file as per comments.

yash4242 and others added 4 commits February 27, 2026 05:15
Signed-off-by: Yash Mehan <yashmehan@gmail.com>
Signed-off-by: Yash Mehan <yashmehan@gmail.com>
Signed-off-by: Yash Mehan <yashmehan@gmail.com>
Comment thread pyproject.toml Outdated
Comment thread pyproject.toml Outdated
Comment thread pyproject.toml Outdated
Comment thread pyproject.toml
Copy link
Copy Markdown
Collaborator

@dushyantbehl dushyantbehl left a comment

Choose a reason for hiding this comment

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

Good progress @yash4242
minor changes requested along with updates to the dockerfile to match the incoming changes.

Signed-off-by: Yash Mehan <yashmehan@gmail.com>
@dushyantbehl
Copy link
Copy Markdown
Collaborator

/build

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 5, 2026

Build failed for 4f482f1 (NVCR image)

View run

yash4242 added 3 commits March 6, 2026 06:51
Signed-off-by: Yash Mehan <yashmehan@gmail.com>
Signed-off-by: Yash Mehan <yashmehan@gmail.com>
Signed-off-by: Yash Mehan <yashmehan@gmail.com>
@yash4242
Copy link
Copy Markdown
Contributor Author

yash4242 commented Mar 6, 2026

Please have a look at the PR. trl >=0.27 is supported, transformers >= 5.2 is supported. It should pass the lint check as well as the other checks.

@dushyantbehl
Copy link
Copy Markdown
Collaborator

/build

Copy link
Copy Markdown
Collaborator

@dushyantbehl dushyantbehl left a comment

Choose a reason for hiding this comment

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

Looks good to me. Good work @yash4242 !

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 9, 2026

Build succeeded for c854702 (NVCR image)

View run

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 9, 2026

Build succeeded for c854702 (NVCR image)

View run

@dushyantbehl dushyantbehl merged commit 09810e3 into foundation-model-stack:main Mar 9, 2026
9 checks passed
dushyantbehl added a commit that referenced this pull request Mar 26, 2026
YashasviChaurasia added a commit to YashasviChaurasia/fms-hf-tuning that referenced this pull request Mar 27, 2026
dushyantbehl added a commit that referenced this pull request Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants