Skip to content

Support transformers 4.53 and SmolLM3#22

Merged
IlyasMoutawwakil merged 19 commits into
mainfrom
transformers-4.53
Jul 23, 2025
Merged

Support transformers 4.53 and SmolLM3#22
IlyasMoutawwakil merged 19 commits into
mainfrom
transformers-4.53

Conversation

@IlyasMoutawwakil
Copy link
Copy Markdown
Member

Comment thread optimum/exporters/onnx/model_patcher.py
Comment thread optimum/exporters/onnx/utils.py Outdated
Comment thread pyproject.toml
# "optimum~=1.26",
# "optimum~=1.27",
"optimum @ git+https://github.com/huggingface/optimum.git@mv-onnx",
"transformers>=4.36,<4.53.0",
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.

For my knowledge: what is the policy for supporting transformers versions? When can be drop support for an old version?

Copy link
Copy Markdown
Member Author

@IlyasMoutawwakil IlyasMoutawwakil Jul 17, 2025

Choose a reason for hiding this comment

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

tbh I'm not sure, I also believe that we should drop some versions because transformers has changed so much.
maybe keeping 10 or 12 versions since there's one transformers release every month ? @echarlaix

@IlyasMoutawwakil IlyasMoutawwakil changed the title Support transformers 4.53 Support transformers 4.53 and SmolLM3 Jul 17, 2025
Comment thread optimum/exporters/onnx/base.py
# This is a workaround for the Qwen3 Moe Sparse block that is not compatible with ONNX export.
# The forward method of the Moe Sparse block is patched to avoid looping only on the experts that are selected
# by the router, which fails during execution in ONNX Runtime.
# TODO: investigate more on this issue.
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.

Maybe helpful to create tracking issues and link them here?

@justinchuby
Copy link
Copy Markdown
Collaborator

Is this ready to merge?

@IlyasMoutawwakil
Copy link
Copy Markdown
Member Author

@justinchuby not yet, there new changes in optimum's PR that I need to bring here. should be updated and merged today !

@IlyasMoutawwakil
Copy link
Copy Markdown
Member Author

IlyasMoutawwakil commented Jul 23, 2025

@justinchuby I will merge once slow tests pass

@IlyasMoutawwakil IlyasMoutawwakil merged commit ff096ac into main Jul 23, 2025
21 of 22 checks passed
@IlyasMoutawwakil IlyasMoutawwakil deleted the transformers-4.53 branch July 23, 2025 11:55
justinchuby added a commit that referenced this pull request Jul 23, 2025
Import from future to leverage the latest style for python typing
annotations, and make import more efficient.

Depends on #22

---------

Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Co-authored-by: IlyasMoutawwakil <moutawwakil.ilyas.tsi@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants