Welcome PaliGemma 2 – New vision language models by Google
PaliGemma 2 pairs Google's SigLIP image encoder with Gemma 2 text decoders, shipping pre-trained vision language models at 3B, 10B and 28B parameters, each at 224, 448 and 896 pixel input resolutions, plus 3B and 10B checkpoints fine-tuned on DOCCI for detailed captioning. The DOCCI fine-tunes cut factual errors in captions, with the 10B model scoring 20.3 non-entailment sentences versus 34.3 for the original PaliGemma. The models run in transformers 4.47+ and can be loaded with bitsandbytes quantization: a 3B checkpoint on TextVQA drops only from 60.04% to 58.72% accuracy at 4-bit nf4. LoRA fine-tuning on half the VQAv2 validation split took about 30 minutes on three 80GB A100s.
Related posts
- PaliGemma – Google's Cutting-Edge Open Vision Language Model
Hugging Face mediumAdeptPaliGemma is Google's open vision-language model family that pairs a SigLIP-So400m image encoder with a Gemma-2B text decoder through a linear projector. It ships as pretrained, mix and task-specific fine-tuned checkpoints at 224, 448 and 896 resolutions. Behaviour is steered with task prefixes such as "detect" and "segment", and detections come back as <loc> tokens normalized to 1024. Images become 256 to 4096 prefix tokens with full attention over the image and prompt, so higher resolutions cost much more memory while helping mainly fine-grained tasks like OCR. The post includes transformers code for inference, 4-bit loading, and fine-tuning the decoder with full training or QLoRA, plus big_vision transfer configs.
- Welcome Gemma 3: Google's all new multimodal, multilingual, long context open LLM
Hugging Face mediumAdeptGemma 3 is Google's open-weight model family in 1B, 4B, 12B and 27B sizes, with 128k context (32k for 1B), image input via a SigLIP encoder on the 4B and larger models, and support for 140+ languages. Long context comes from pretraining at 32k and then scaling to 128k with RoPE base frequency raised to 1M. KV cache size is cut by interleaving 5 local sliding-window layers (window 1024) per global layer. Images get bidirectional attention and "pan and scan" cropping, and a 262K-entry SentencePiece tokenizer improves CJK encoding. The 27B IT model scores 1339 Elo on Chatbot Arena, and the post includes inference code for transformers, MLX, llama.cpp and HF Endpoints.
- Welcome Gemma 2 - Google’s new open LLM
Hugging Face mediumAdeptGemma 2 ships in 9B and 27B sizes (base and instruction-tuned) with an 8K context, trained on 8T and 13T tokens respectively. Architecturally it interleaves 4096-token sliding-window attention with global attention on alternating layers, applies tanh logit soft-capping (50.0 for attention, 30.0 for final logits), pre-trains the 9B via knowledge distillation, uses on-policy distillation in post-training, and merges models with WARP. Practical notes: soft-capping is incompatible with Flash Attention/SDPA, so fine-tune with eager attention, and run the 27B instruct model in bfloat16 because float16 gives erratic output. Covers Transformers usage (about 18 GB for the 9B model, and 4-bit loading of the 27B in about 18 GB), QLoRA fine-tuning with TRL, and TGI deployment.
- Welcome Gemma - Google’s new open LLM
Hugging Face mediumAdeptGoogle's Gemma open LLM family ships in 2B and 7B sizes, each with base and instruction-tuned variants and an 8K context. On the Open LLM Leaderboard Gemma 7B scores 63.75, comparable to Mistral 7B, while Gemma 2B trails Phi-2. Hugging Face supports it through Transformers 4.38, including bfloat16 inference in about 18 GB, 4-bit loading in about 9 GB, and a ~4x speedup with torch.compile. Other integrations include JAX/Flax weights, Vertex AI/GKE and Inference Endpoints deployment via Text Generation Inference with an OpenAI-compatible Messages API, and a QLoRA fine-tuning recipe with TRL that takes about 9 hours on one A10G.
- Welcome Gemma 4: Frontier multimodal intelligence on device
Hugging Face mediumAdeptGoogle DeepMind's Gemma 4 is an Apache 2-licensed multimodal model family in five sizes: E2B, E4B, a 12B encoder-free Unified model, a 31B dense model and a 26B MoE with 4B active parameters. The models take text, image, video and in some sizes audio, with context windows up to 256K. The architecture combines alternating sliding-window and global attention, dual RoPE configurations, Per-Layer Embeddings that feed a small per-layer residual signal, and a shared KV cache in which the final layers reuse earlier layers' key/value tensors to save memory and compute. Practical guidance covers modality ordering in prompts (images before text, audio after), native JSON bounding-box output on a 1000x1000 grid, and running or fine-tuning the models with transformers, llama.cpp, MLX, transformers.js, Mistral.rs and TRL.