LAVIS icon indicating copy to clipboard operation
LAVIS copied to clipboard

How to extract features from custom finetuned BLIP2 model on HuggingFace?

Open SnowNation101 opened this issue 1 year ago • 0 comments

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?

SnowNation101 avatar Feb 26 '24 05:02 SnowNation101