Skip to content
Back to skills

Paligemma 2

ASecurity

"Use Maestro's PaliGemma 2 recipe for JSON extraction, VQA,

  • 247 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 8, 2026
toolspythongobashapi

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill paligemma-2 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Paligemma 2?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Paligemma 2
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-paligemma-2/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-paligemma-2)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: paligemma-2
description: "Use Maestro's PaliGemma 2 recipe for JSON extraction, VQA,
  OCR-style fine-tuning, checkpoint loading, and inference."
disable-model-invocation: true
metadata:
  disco-role: operating
license: Apache 2.0
---

# PaliGemma 2

Use this sub-skill when the user needs Maestro's `paligemma_2` route for PaliGemma 2 text-generation fine-tuning or inference over images: JSON extraction, VQA, OCR-style prompts, loading/saving checkpoints, or choosing LoRA/QLoRA/freeze/full fine-tuning behavior.

## Route here for

- CLI training through `maestro paligemma_2 train`.
- Python training through `maestro.trainer.models.paligemma_2.core.PaliGemma2Configuration` and `train(config)`.
- Checkpoint work through `load_model(...)`, `save_model(...)`, and `OptimizationStrategy`.
- Single-image prediction through `maestro.trainer.models.paligemma_2.inference.predict(...)`.
- PaliGemma-specific prompt handling, especially when and where Maestro prepends `<image>`.

## Route elsewhere

- Generic JSONL split validation, Roboflow dataset identifiers, image-file checks, and metric registry details belong in [datasets-and-metrics](../datasets-and-metrics/).
- Florence-2 or Qwen2.5-VL detection formatting belongs in their sibling sub-skills. Maestro's PaliGemma 2 implementation provides train/evaluation collate functions and text prediction; it does **not** expose a PaliGemma object-detection formatter API.
- Package-wide installation, root CLI discovery, and non-model-specific import warnings belong in the root [installation and CLI guide](../../references/installation-and-cli.md) and root troubleshooting reference.

## Source-backed defaults to preserve

- Default model id: `google/paligemma2-3b-pt-224`.
- Default revision: `refs/heads/main`.
- Default train output base: `./training/paligemma_2`; training creates a numbered run directory below it.
- Training/evaluation generation length default: `PaliGemma2Configuration.max_new_tokens = 512`.
- Direct prediction default: `predict(..., max_new_tokens=1024)`.
- Dataset JSONL `prefix` values should not include `<image>` for standard Maestro use; `train_collate_fn`, `evaluation_collate_fn`, and `predict` prepend `<image>` internally.

## Operating sequence

1. Confirm the dataset task and split layout with [datasets-and-metrics](../datasets-and-metrics/) before choosing model parameters.
2. Use [API reference](references/api-reference.md) to choose CLI vs Python API, optimization strategy, checkpoint load/save behavior, and exact option names.
3. Use [workflows](references/workflows.md) for JSON extraction, VQA, OCR-style fine-tuning, inference, and safe validation steps.
4. Use [troubleshooting](references/troubleshooting.md) for QLoRA/bitsandbytes, CUDA memory, invalid JSON suffixes, token truncation, HF access, and CLI edge cases.
5. Use the bundled helper only to generate configuration text; it never downloads models or starts training:

```bash
python scripts/build_paligemma_config.py \
  --dataset ./dataset \
  --optimization-strategy lora \
  --metric edit_distance \
  --metric bleu \
  --emit json
```

Files in this skill

  • SKILL.md3 KB
  • references/api-reference.md8.7 KB
  • references/troubleshooting.md5.3 KB
  • references/workflows.md7.2 KB
  • scripts/build_paligemma_config.py6.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.