-
Notifications
You must be signed in to change notification settings - Fork 276
Fix compatible issue with transformers 5.0+ #2328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,5 +37,3 @@ sentencepiece | |
| soundfile | ||
| tabulate | ||
| torchvision | ||
| # Remove version pin when the tests are fixed | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should you add
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. instead of transformers>=5, i want to support both cases by adding transformers version check |
||
| transformers<5.0.0 | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
register_dynamic_cache_export_support Does not have the right ordering for kvcaches. I would just use the same patch regardless of the transformers version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean
_patch_model_if_necessary? transformers 5.0 updated DynamicCache and i got error "AttributeError: 'DynamicCache' object has no attribute 'to_legacy_cache'"Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can update the patch code (_patch_model_if_necessary) so that it works universally. There is no need to call to_legacy_cache. The executorch integration is not reliable for our usages.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@titaiwangms suggestions on what the patch logic should be?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So can we get rid of
register_dynamic_cache_export_supportnow?