Path: blob/main/examples/paligemma/Fine_tuned_Model_Inference.ipynb
5906 views
Kernel: Python 3
Fine-tuned PaliGemma Inference
In this notebook we will see how to infer a PaliGemma fine-tuned model (using 🤗 transformers).
We need the latest version of transformers library.
In [ ]:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.1/9.1 MB 23.0 MB/s eta 0:00:00
Let's login to Hugging Face.
In [ ]:
VBox(children=(HTML(value='<center> <img\nsrc=https://huggingface.co/front/assets/huggingface_logo-noborder.sv…
Let's load the model.
In [ ]:
We have fine-tuned the model on visual question answering (VQAv2). Hence, we will pass an image to the model and ask a question about it. Below is a rather challenging image for vision language models. Pretrained PaliGemma responds below image and question with "antique".
In [ ]:
In [ ]:
Loading checkpoint shards: 0%| | 0/2 [00:00<?, ?it/s]
gramophone