-
Notifications
You must be signed in to change notification settings - Fork 11
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
PEFT fine tune CLIP VIT-G? #4
Comments
That's an interesting idea! I am not sure what would happen, as converting from weight matrix to theta and r affects all parameters, so what happens to those that are frozen? It may be fine, though, because the learned features are preserved in this modification - I am just not sure what happens if you train like that and some parameters can't update. But I'd say it's possible that it will be just the same as with a weight matrix and a large number of parameters frozen (except better model training ensues with GmP!). And yeah, they renamed the model structure (same as with HF openai/clip which, in addition to all the attaching-of-ViT and stuff, I also had to accomplish in the conversion scripts we discussed last time). If you do a diff of these files: orclip/modeloriginal.py ...You can tell ChatGPT exactly what changed, and then tell it to implement these changes but applied in the syntax for peft. Make sure you provide the entire class to the LLM, but explicitly point out the function that has been altered within. GPT-4o should be able to apply that to whatever naming peft uses. To state it upfront: I probably won't have time to look into this before the weekend, but please do give me an update (no matter if it's a problem or a success)! I'm curious how that will turn out. Who knows, maybe it is a way to train BIG-G after all? 😄 |
Sad update for now :(
I'd probably have to hack PEFT itself, and that'll presumably be a somewhat extreme project. Well, at least I have performed the surgery on the BiG-G for now! 🙃 |
I just opened an issue with the PEFT folks. Who knows. Maybe they'll be interested - or they can confirm that this absolutely won't work, which would also be a very valuable thing. Fingers crossed! :-) |
Hello again!
Would it be possible to modify the GMP fine tune script to train a LoRA with PEFT for the CLIP VIT-G model? Then merge the LoRA with the model to get a new CLIP-G model?
Chat-GPT seems to think you can do it. But you have some clip module that only has certain clip models from openai, and not the clip G which I think is from LAION?
The text was updated successfully, but these errors were encountered: