-
Notifications
You must be signed in to change notification settings - Fork 31.4k
Fix key mapping for VLMs #39029
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
Fix key mapping for VLMs #39029
Conversation
zucchini-nlp
left a comment
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.
Thanks, indeed it doesn't handle when users inherit from VLM classes. Can you also update a similar line in self.save_pretrained?
|
Hi @zucchini-nlp ! Thank you for reviewing my PR. Yes, I’ve also updated the corresponding line in |
|
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. |
* fix key mapping for VLMs * use __mro__ instead * update key mapping in save_pretrained
|
Insane PR, thanks a lot @bvantuan, wasn't aware of mro[:-1] when I proposed the key mapping patch ! |
* fix key mapping for VLMs * use __mro__ instead * update key mapping in save_pretrained
* fix key mapping for VLMs * use __mro__ instead * update key mapping in save_pretrained
* fix key mapping for VLMs * use __mro__ instead * update key mapping in save_pretrained
* fix key mapping for VLMs * use __mro__ instead * update key mapping in save_pretrained
* fix key mapping for VLMs * use __mro__ instead * update key mapping in save_pretrained
* fix key mapping for VLMs * use __mro__ instead * update key mapping in save_pretrained
* fix key mapping for VLMs * use __mro__ instead * update key mapping in save_pretrained
What does this PR do?
Fixes #39004
Fixes key mapping for VLMs when they are extended by a custom subclass.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.
@zucchini-nlp