Can anyone help me convert the pre-trained model from hugging face to .pte? #148
Replies: 1 comment
-
Closing because duplicated in #147 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Can anyone help me convert the pre-trained model from hugging face to .pte?
I Tried this but didn't work for me
I want to create the .pte for this model
https://huggingface.co/Salesforce/blip-image-captioning-base
from transformers import AutoModel
import torch
model = AutoModel.from_pretrained("Salesforce/blip-image-captioning-base")
model.eval()
dummy_input = torch.randn(1, 3, 224, 224) # Adjust dimensions as needed
traced_model = torch.jit.trace(model, dummy_input)
traced_model.save("model.pte")
Beta Was this translation helpful? Give feedback.
All reactions