Downloads · 30 days
17
7% of all-time downloads
Alfaxad/wild-gemma-4-E4B-it
wild-gemma-4-E4B-it is a image-text-to-text model from Alfaxad. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
Wild Gemma 4 E4B IT is the Savanna Sentinel fine-tune of Gemma 4 E4B IT for structured wildlife monitoring from Serengeti camera-trap events. It is trained to read one to three camera-trap frames plus event metadata a…
Downloads · 30 days
17
7% of all-time downloads
All-time downloads
240
Public
Parameters
8B
32 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors16 GB · 100%
From the Hugging Face model README
Wild Gemma 4 E4B IT is the Savanna Sentinel fine-tune of Gemma 4 E4B IT for structured wildlife monitoring from Serengeti camera-trap events. It is trained to read one to three camera-trap frames plus event metadata and return machine-readable JSON for species/event interpretation, review routing, and downstream reporting workflows.
This repository contains the corrected merged Hugging Face model. The LoRA adapter was trained with Unsloth, then manually merged into the Gemma 4 E4B IT base weights after the automated merged artifact failed smoke tests. The corrected merge was re-evaluated before publication.
unsloth/gemma-4-E4B-it, derived from google/gemma-4-E4B-itW += (B @ A) * alpha / rAlfaxad/wild-gemma-4-E4B-it-GGUFGemma 4 E4B is a dense multimodal model with text, image, and audio support in the base model family. This Savanna Sentinel release was evaluated for image+text camera-trap inference; audio behavior was not evaluated for this project.
This model is intended for open wildlife-monitoring demos, research prototypes, and production experiments around camera-trap event triage.
Primary input:
Primary output:
Primary tasks:
Fine-tuned on Alfaxad/wildlife-sentinel.
The dataset was generated for Savanna Sentinel from:
Training package used by the run:
| Split group | Rows |
|---|---|
| Train rows | 38,612 |
| Validation rows | 672 |
| Total audited rows | 39,284 |
Training rows by task:
| Task | Rows |
|---|---|
| Phase 1 event interpretation | 17,496 |
| Phase 2 review routing | 17,496 |
| Phase 3 tool-agent planning | 2,220 |
| Phase 3 report generation | 1,400 |
Validation rows by task:
| Task | Rows |
|---|---|
| Phase 1 event interpretation | 256 |
| Phase 2 review routing | 256 |
| Phase 3 tool-agent planning | 80 |
| Phase 3 report generation | 80 |
The training examples use chat-style multimodal messages. Image content is placed before text content, matching Gemma 4 and Ollama multimodal best practice.
| Metric | Value |
|---|---|
| Epochs | 1.0 |
| Train loss | 0.007153 |
| Train runtime | 35,587.66 seconds |
| Samples/sec | 1.085 |
| Steps/sec | 0.136 |
| Peak CUDA reserved | 13.498 GB |
| Chosen max length | 8192 |
| Max audited text tokens, before visual tokens | 1754 |
| P99 audited text tokens, before visual tokens | 1653 |
| Max images per example | 3 |
max_length=8192 was selected to leave room for up to three image frames after the chat-template text tokens.
The metrics below are diagnostic evaluations after the merge/export fix. They are useful for regression checking and comparison between base, merged, and Ollama-exported variants, but they should not be treated as a final benchmark.
| Model | Mode | Rows | JSON valid | Species exact | Species overlap | Blank correct | Review correct |
|---|---|---|---|---|---|---|---|
| HF base Gemma 4 E4B IT | non-thinking | 40 | 0.800 | 0.222 | 0.222 | 0.000 | n/a |
| Wild Gemma HF | non-thinking | 40 | 0.775 | 0.273 | 0.273 | 0.818 | 1.000 |
| Wild Gemma HF | thinking | 24 | 0.917 | 0.667 | 0.667 | 0.800 | 1.000 |
| Official Ollama Gemma 4 E4B | non-thinking | 24 | 0.917 | 0.333 | 0.333 | 0.000 | n/a |
| Wild Gemma Ollama/GGUF | non-thinking | 40 | 0.725 | 0.364 | 0.364 | 0.889 | 1.000 |
| Wild Gemma Ollama/GGUF | thinking | 24 | 0.792 | 0.500 | 0.500 | 1.000 | 1.000 |
The fine-tune substantially improves blank-event handling and review-routing behavior relative to the base diagnostic runs. Thinking mode improved the HF merged model on the small diagnostic species subset.
The full run artifacts are included under metrics/:
train_metrics.jsondataset_runtime_stats.jsondataset_token_length_audit.jsonmerge_manual_lora_status.jsonmerge_manual_lora_smoke.jsonevaluation_base.jsonevaluation_finetuned_adapter_redo_diagnostic.jsonevaluation_ollama_manual_combined_q4_officialmeta_redo.jsonUse the Gemma 4 chat template from the tokenizer/processor. For multimodal prompts, place image content before text content. Ask for strict JSON only, and validate the response against the application schema before using it in production.
Example prompt intent:
Classify this Serengeti camera-trap capture event. Use the images first, then the metadata. Return only valid JSON matching savanna_sentinel_event_v1.
Recommended generation defaults for parity with the evaluation setup:
temperature = 1.0
top_p = 0.95
top_k = 64
For deterministic regression testing, use fixed seeds and task-specific max generation limits.
Gemma 4 supports configurable thinking. For this model:
In runtimes that expose Gemma 4 thinking through the chat template, enable thinking with the runtime flag or by placing <|think|> at the start of the system prompt. For schema production, strip any thought channel content and keep only the final JSON.
The main event interpretation target follows this shape:
{
"schema_version": "savanna_sentinel_event_v1",
"capture_event_id": "ASG...",
"blank": false,
"detections": [
{
"species": "zebra",
"count_bin": "3",
"behaviors": {
"standing": false,
"resting": false,
"moving": true,
"eating": false,
"interacting": false
},
"young_present": false,
"confidence": "high",
"evidence": {
"visual_basis": "Striped equids visible across the image burst.",
"frames_used": [1, 2, 3]
}
}
],
"review": {
"review_needed": false,
"reasons": []
}
}
Production callers should treat model output as untrusted text until JSON parsing and schema validation succeed.
Please cite the upstream model and data sources when using this model:
google/gemma-4-E4B-itunsloth/gemma-4-E4B-itAlfaxad/wildlife-sentinel