# Gemma 4
Gemma 4 produces object detections from image and text input.
Tasks: Detection. Install: pip install "libreyolo[vlm]".
Verified against LibreYOLO v1.6.0.

## Install

```bash
pip install "libreyolo[vlm]" "transformers>=5.10.0"
```

## Predict

**Python**

```python
from libreyolo import LibreVLM, SAMPLE_IMAGE

model = LibreVLM("gemma-4-e2b", device="cpu")
model.set_classes(["person", "building"])
result = model(SAMPLE_IMAGE)
print(result.boxes)
```

The E2B and E4B adapters parse boxes on a 0–1000 coordinate grid. The bare `gemma-4` alias selects E4B. Install Transformers 5.10 or later. Training is not supported.

## Licensing

Check the license on the Hugging Face repository of the specific weights you download. That repository is authoritative and licenses are not always uniform across a family. This is a description of the licenses involved, not legal advice.

- Original work: Gemma 4, Google
- Upstream license: Apache-2.0
- Upstream source: https://huggingface.co/google
- LibreYOLO code: MIT
- Weights: Apache-2.0, republished at https://huggingface.co/LibreYOLO
- Interpretation: The Gemma 4 adapters reference Apache-2.0 snapshots; this declaration does not apply to other Gemma generations.
