Notebooks
H
Hugging Face
Fine Tuned Model Inference

Fine Tuned Model Inference

paligemmahf-notebooksexamples

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.

[ ]
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.1/9.1 MB 23.0 MB/s eta 0:00:00

Let's login to Hugging Face.

[ ]
VBox(children=(HTML(value='<center> <img\nsrc=https://huggingface.co/front/assets/huggingface_logo-noborder.sv…

Let's load the model.

[ ]

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".

[ ]

[ ]
Loading checkpoint shards:   0%|          | 0/2 [00:00<?, ?it/s]

gramophone