Skip to content

Upgrade transformers to 4.48.0 for llama2#24302

Merged
xadupre merged 46 commits intomainfrom
syang/transformers-upgrade-llama2
Apr 18, 2025
Merged

Upgrade transformers to 4.48.0 for llama2#24302
xadupre merged 46 commits intomainfrom
syang/transformers-upgrade-llama2

Conversation

@selenayang888
Copy link
Contributor

@selenayang888 selenayang888 commented Apr 3, 2025

Description

Upgrade Transformers to 4.48.0 for llama2, this version deprecated the old format of past_key_value, the current format is DynamicCache. So, we need to add patches to dynamo exporter in llama2.

Thanks to @xadupre who made the changes to add the patches to dynamo exporter, and implements patches to transformers 4.48.0 which don't export and convert dynamic_axes into dynamic shapes.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

You can commit the suggested changes from lintrunner.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

You can commit the suggested changes from lintrunner.

xadupre and others added 5 commits April 17, 2025 10:07
…y.py

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…y.py

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…s.py

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

You can commit the suggested changes from lintrunner.

xadupre and others added 4 commits April 17, 2025 16:51
…hes/__init__.py

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…hes/__init__.py

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…hes/__init__.py

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…hes/__init__.py

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

You can commit the suggested changes from lintrunner.

…hes/__init__.py

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

You can commit the suggested changes from lintrunner.

…hes/__init__.py

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@xadupre xadupre merged commit c19a496 into main Apr 18, 2025
85 of 89 checks passed
@xadupre xadupre deleted the syang/transformers-upgrade-llama2 branch April 18, 2025 07:32
ashrit-ms pushed a commit that referenced this pull request Apr 24, 2025
### Description
Upgrade Transformers to 4.48.0 for llama2, this version deprecated the
old format of past_key_value, the current format is DynamicCache. So, we
need to add patches to dynamo exporter in llama2.

Thanks to @xadupre who made the changes to add the patches to dynamo
exporter, and implements patches to transformers 4.48.0 which don't
export and convert dynamic_axes into dynamic shapes.

---------

Co-authored-by: xadupre <xadupre@microsoft.com>
Co-authored-by: Xavier Dupré <xadupre@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
intbf pushed a commit to intbf/onnxruntime that referenced this pull request Apr 25, 2025
### Description
Upgrade Transformers to 4.48.0 for llama2, this version deprecated the
old format of past_key_value, the current format is DynamicCache. So, we
need to add patches to dynamo exporter in llama2.

Thanks to @xadupre who made the changes to add the patches to dynamo
exporter, and implements patches to transformers 4.48.0 which don't
export and convert dynamic_axes into dynamic shapes.

---------

Co-authored-by: xadupre <xadupre@microsoft.com>
Co-authored-by: Xavier Dupré <xadupre@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: bfilipek <bartlomiej.filipek@intel.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.

4 participants