artigen / export_model.py
CallmeKaito's picture
Create export_model.py
ad49fb5 verified
raw
history blame
199 Bytes
import torch
# Load the model
model = VisionEncoderDecoderModel.from_pretrained("nlpconnect/vit-gpt2-image-captioning")
# Save the model state dictionary
torch.save(model.state_dict(), "model.pth")