Downloads · 30 days
0
PessoniHugo/paligemma_residencia_V2.1
paligemma_residencia_V2.1 is a image-text-to-text model from PessoniHugo. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
Fine-tuning completo do PaliGemma incluindo: - ✅ Language Model (LoRA rank 8) - ✅ Vision Tower (LoRA rank 4) - ✅ Multi-Modal Projector (LoRA rank 8)
Downloads · 30 days
0
Access
Public
Updated Nov 2, 2025
Repo size
52.5 MB
Likes
0
Public
Click a slice to open those files.
.safetensors52.5 MB · 100%
From the Hugging Face model README
Fine-tuning completo do PaliGemma incluindo:
from transformers import PaliGemmaProcessor, PaliGemmaForConditionalGeneration
from peft import PeftModel
import torch
# Carregar modelo base
model = PaliGemmaForConditionalGeneration.from_pretrained(
"google/paligemma-3b-pt-448",
torch_dtype=torch.bfloat16,
device_map="auto"
)
# Carregar adaptadores LoRA
model = PeftModel.from_pretrained(model, "PessoniHugo/paligemma_residencia_vision_v2")
processor = PaliGemmaProcessor.from_pretrained("google/paligemma-3b-pt-448")
# Inferência
image = ... # PIL Image
question = "answer What type of chart is this?"
inputs = processor(text=question, images=image, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=20)
print(processor.decode(outputs[0], skip_special_tokens=True))