# PaliGemma (2024)

> Paired SigLIP and Gemma-2B with a linear projection, prefix-LM attention and unfrozen multi-resolution pretraining to build a compact 3B transfer base model.

Page: https://mralbu.github.io/ai-datasets/p/paligemma

## Key facts

- Title: PaliGemma: A versatile 3B VLM for transfer
- Authors: Lucas Beyer, Andreas Steiner, André Susano Pinto, Alexander Kolesnikov, Xiao Wang, Daniel Salz, Maxim Neumann, Ibrahim Alabdulmohsin, Michael Tschannen, Emanuele Bugliarello, Thomas Unterthiner, Daniel Keysers, et al.
- Venue: arXiv July 2024
- Category: Vision
- Paper: https://www.alphaxiv.org/abs/2407.07726

## Why it matters

While most open VLMs optimized for zero-shot chat, PaliGemma revived the "pretrain once, fine-tune cleanly anywhere" paradigm for vision-language models. Its thorough ablations also settled key ViT+LLM engineering questions: unfreezing the encoder, prefix-LM masking and stepping up resolution mattered far more than fancy connectors.

## The idea

Connect a SigLIP-So400m vision encoder to a Gemma-2B decoder with a single linear layer and apply prefix-LM masking—full bidirectional attention across the image tokens and text prompt, causal attention only on the generated answer. Unlike chat VLMs that freeze the vision tower, train the entire model on a billion-example mixture of captioning, VQA, OCR and localization tasks, then run short high-resolution stages at 448px and 896px so fine text and small objects survive.

## The result

Fine-tuned across nearly 40 benchmarks, the 3B model reached 85.6% on VQA v2, 144.6 CIDEr on COCO captions, 76.5% on TextVQA and 84.8 on DocVQA—jumping from 43.7 on DocVQA at 224px to 84.8 at 896px—matching or beating models 10× larger.

## The data

- [VQA v2 (2017)](https://mralbu.github.io/ai-datasets/d/vqa-v2.md): 1.1 million questions about COCO photos, each answered by ten people.
- [MS COCO (2014)](https://mralbu.github.io/ai-datasets/d/coco.md): 330k everyday scenes with 1.5M labeled objects in 80 categories.
- [TextVQA (2019)](https://mralbu.github.io/ai-datasets/d/textvqa.md): 45,000 questions about signs, labels, clocks and book covers in everyday photos, each answered by ten people.
- [DocVQA (2020)](https://mralbu.github.io/ai-datasets/d/docvqa.md): 50,000 questions over 12,767 scanned industry documents—forms, tables, letters and handwritten notes.
- [ChartQA (2022)](https://mralbu.github.io/ai-datasets/d/chartqa.md): 32,700 questions over 20,882 real-world bar, line and pie charts requiring reading values and doing math.

## Builds on

- [SigLIP (2023)](https://mralbu.github.io/ai-datasets/p/siglip.md)
- [LLaVA (2023)](https://mralbu.github.io/ai-datasets/p/llava.md)

## Part of

- [Modern VLMs](https://mralbu.github.io/ai-datasets/t/modern-vlms.md) (step 6 of 8)
