LAVIS
LAVIS copied to clipboard
How to extract features from custom finetuned BLIP2 model on HuggingFace?
Hi authors, thanks for the great work! I want to finetune a BLIP2 model on my custom dataset to do text-image retrieval tasks. I finetuned model Salesforce/blip2-opt-2.7b
on HuggingFace (loaded it as model = Blip2Model.from_pretrained(MODEL_PATH)
) with PEFT, and saved the weights to a .pt
file. How can I use the pt file to do feature extraction? Or, should I finetune it and load it in another way?