-
Notifications
You must be signed in to change notification settings - Fork 1.1k
chore(clip): update the clip example to make it compatible with HF format #472
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
Conversation
awni
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.
Awesome!! Thank you! That is a big improvement.
I left a few minor comments, let me know what you think then we can merge.
Co-authored-by: Awni Hannun <[email protected]>
|
@awni, thanks for helping with reviewing the PR. I have addressed all the comments, it should be ready to merge now. Please let me know if there are any other changes needed. |
|
@mzbac let me know when I should check this again |
|
@awni, this is ready for merging. Once this is merged, I will work with @nkasmanoff on #461 |
| if "position_ids" in k: | ||
| # Remove unused position_ids | ||
| continue | ||
| elif "patch_embedding.weight" in k: |
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.
👍
awni
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.
Looks great, thank you!!
|
Thanks!! |
…rmat (ml-explore#472) * chore(clip): update the clip model to be HF format * Update clip/convert.py Co-authored-by: Awni Hannun <[email protected]> * chore: address comments * chore: rename ClipVisionModel and ClipTextModel * chore: add output hidden_states support * chore: remove custom conv2d and apply weight transpose during weight sanitizing * Update clip/model.py * Update clip/model.py --------- Co-authored-by: Awni Hannun <[email protected]>
Update the clip model format to HF format to make it easier for later use as a vision tower in the llava model.
close #463