Paligemma-3b-ft-vizwizvqa-224 (16-bit Quantized)

This is a 16-bit quantized version of google/paligemma-3b-ft-vizwizvqa-224, fine-tuned for visual question answering on the VizWiz dataset.

Usage

from transformers import AutoProcessor, AutoModelForImageTextToText
from PIL import Image

processor = AutoProcessor.from_pretrained("akazen/paligemma-3b-ft-vizwizvqa-16bit")
model = AutoModelForImageTextToText.from_pretrained(
    "akazen/paligemma-3b-ft-vizwizvqa-16bit",
    device_map="auto"
)

# Process an image
image = Image.open("your_image.jpg").convert("RGB")
question = "What's in this image?"
prompt = f"<image>\nQuestion: {question}\nAnswer:"

inputs = processor(images=image, text=prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=20)
answer = processor.decode(outputs[0], skip_special_tokens=True)
Downloads last month
7
Safetensors
Model size
2.92B params
Tensor type
FP16
·
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API: The model has no library tag.