A reproducible vLLM benchmark harness for Gemma 4 26B-A4B on NVIDIA Jetson AGX Thor — grounded text, structured output, vision, multilingual OCR, tool use, and systems behavior, measured on real edge hardware.
This repository packages a reproducible vLLM benchmark harness for evaluating Gemma 4 26B-A4B on NVIDIA Jetson AGX Thor across practical edge workloads. The strongest signal from the benchmark is clear: Gemma 4 performs especially well on grounded text tasks, structured outputs, closed-set vision, and multilingual image-text extraction in a real Jetson deployment.
For a narrative summary of the results, see docs/gemma4_edge_blog_post.md.
This repository is intentionally centered on Gemma 4 26B-A4B, the Gemma 4 Mixture-of-Experts (MoE) variant selected for this Jetson-focused evaluation.
It does not compare every Gemma 4 model. In particular, this public summary does not benchmark:
Gemma 4 E2BGemma 4 E4BGemma 4 31B
Instead, it measures how the 26B-A4B MoE model behaves on edge-style text, image, OCR, and structured-output tasks when served with vLLM on Jetson Thor.
The benchmark exercises:
- grounded document QA and summarization
- structured extraction and format compliance
- multilingual text and multilingual image-text extraction
- closed-set image classification
- tool-use and conversation handling
- safety and robustness families such as abstention, prompt injection resistance, and citation/source attribution
- Jetson-specific systems measurements such as latency, throughput, telemetry, and thermal behavior
Gemma 4 is a strong fit for edge AI only if it can hold up on real edge-shaped tasks:
- answering from local documents without internet access
- reading images and returning machine-consumable JSON
- staying stable when prompts get longer or more structured
- handling multilingual content and mixed operational contexts
- exposing artifacts that a human or a later LLM judge can review
This repo is designed to make those claims measurable. It captures raw responses, reasoning traces when enabled, token accounting, per-request latency, streaming timelines, and rubric-ready artifacts instead of relying on a single leaderboard number.
- They show that a Gemma 4 MoE model can deliver strong multimodal quality on-device rather than only in cloud-style setups.
- They highlight a practical deployment profile for Jetson:
thinking=falseas the default operating mode, with selective use ofthinking=truewhere it adds value. - They demonstrate that the same deployment can support grounded QA, structured JSON, multilingual OCR-style extraction, and image understanding through a standard OpenAI-compatible API.
The public summary in this repository reflects runs collected on April 17-18, 2026 under the following conditions:
- Device:
NVIDIA Jetson AGX Thor Developer Kit - Platform:
Linux 6.8.12-tegra-aarch64-with-glibc2.39 - Serving stack:
vLLMwith the OpenAI-compatible/v1/chat/completionsendpoint - Model:
bg-digitalservices/Gemma-4-26B-A4B-it-NVFP4 - Modalities enabled in this deployment:
textandimage - Audio: intentionally disabled in the deployed benchmark build
- Reasoning modes:
thinking=falseandthinking=true - Standard workload context limit:
65,536tokens - Standard workload output cap:
2,096tokens - Baseline image soft-token budget:
280 - Additional image configs included:
560and1120 - Prefix caching: disabled for baseline correctness and latency runs, with a separate backend profile for prefix-caching experiments
- Prompt-token accounting: uses vLLM's chat-aware
/tokenizepath with structuredmessages, so counts reflect the actual Gemma 4 chat template instead of a flattened approximation
This choice of model was deliberate. 26B-A4B is the Gemma 4 MoE configuration evaluated here because it offers a different deployment tradeoff from the smaller E2B and E4B models and from the larger dense 31B model. The goal of this repo is to characterize that MoE deployment on Jetson, not to rank every Gemma 4 variant.
Prompt construction follows the Gemma 4 chat path used by the serving stack:
- structured chat messages rather than hand-flattened role text
- official-style Gemma 4 reasoning and tool parsers in vLLM
- schema-constrained JSON where structured output matters
- multimodal chat requests for image workloads
| Deployment condition | Value |
|---|---|
| Hardware | NVIDIA Jetson Thor (aarch64, Linux-6.8.12-tegra) |
| Model | bg-digitalservices/Gemma-4-26B-A4B-it-NVFP4 |
| Container / runtime | vLLM on NVIDIA IoT image b7805-r38.3-arm64-sbsa-cu130-24.04 |
| API | OpenAI-compatible /v1/chat/completions |
| Max context tokens | 65,536 |
| Max output tokens | 2,096 standard benchmark output cap |
| Image soft-token budget | 280 pinned in the baseline image report shown here |
| Reasoning parser | gemma4 |
| Tool-call parser | gemma4 |
| Thinking modes tested | false and true |
| Sampling | temperature=0.0, top_p=1.0, top_k=1 |
| Prefix caching | disabled for baseline measurements |
| Phase 1 repeats | 3 per scenario per mode (N=9,932) |
Phase 1 workload benchmark: 33 text, agent, multilingual, and image familiesPreflight and smoke: fast checks for chat, structured output, tool calling, and image requests in both thinking modesSystems track: thermal soak, concurrency scaling, IO-length sweep, ITL distribution, energy efficiency, KV-cache saturation, cold start, and prefix cachingAdditional research tracks: precision-vision and control-style experiments are included in the repo as supplementary workloads
The README highlights the strongest benchmark signals rather than every appendix-style diagnostic figure.
- Weighted across
9,932scored Phase 1 records, semantic task-completion accuracy was93.43%. - Overall by mode, Phase 1 accuracy was
95.45%withthinking=falseand91.40%withthinking=true. - The image category was the strongest top-level bucket in both modes:
96.3%no-think and92.7%think. - The benchmark showed especially strong behavior on closed-set vision, multilingual OCR without reasoning, structured extraction, multi-hop reasoning, temporal reasoning, prompt injection resistance, and abstention-style guardrails.
| Metric | thinking=false |
thinking=true |
|---|---|---|
| Phase 1 weighted accuracy | 95.45% |
91.40% |
| Phase 1 non-image accuracy | 82.28% |
72.47% |
| CIFAR-10 classification | 91.60% |
90.60% |
| Caltech-256 classification | 99.60% |
99.93% |
| Multilingual image-text extraction | 97.70% |
88.00% |
Additional text and robustness highlights from the scored Phase 1 run:
structured_extraction:90.00%no-think,96.67%thinkmulti_hop_reasoning:100.00%in both modestemporal_sequence_reasoning:100.00%in both modesprompt_injection_resistance:100.00%in both modesabstention_calibration:100.00%in both modes
The benchmark's strongest multimodal signal was its combination of closed-set image understanding and multilingual OCR-style extraction.
- Closed-set image classification was consistently strong:
CIFAR-10:91.60%no-think,90.60%thinkCaltech-256:99.60%no-think,99.93%think
- Multilingual image-text extraction remained strong overall, especially in the default no-think mode:
97.70%no-think88.00%think
- No-think multilingual OCR was near ceiling for most languages in this benchmark slice.
- Across this deployment,
thinking=falseremained the strongest default operating mode for OCR-style workloads because it combined the highest completion reliability with the best latency profile.
thinking=falsewas the best default operating mode for this deployment. It delivered the highest overall reliability and the best balance of accuracy, latency, and completion rate.thinking=truestill helped in selected families such asstructured_extraction, but the most deployment-efficient profile for the benchmark as a whole remainedthinking=false.
| Family | Median latency thinking=false |
Median completion tokens thinking=false |
Median latency thinking=true |
Median completion tokens thinking=true |
Latency ratio |
|---|---|---|---|---|---|
image_classification_cifar10 |
1.43s |
50 |
8.30s |
412 |
5.8x |
image_classification_caltech256 |
1.45s |
51 |
7.26s |
357 |
5.0x |
image_text_extraction_multilingual |
1.95s |
78 |
10.25s |
513 |
5.3x |
structured_extraction |
2.28s |
108 |
25.01s |
1279 |
11.0x |
multi_hop_reasoning |
3.64s |
168 |
12.36s |
614 |
3.4x |
agent_multi_tool |
7.12s |
545 |
21.22s |
1218 |
3.0x |
grounded_qa |
1.63s |
75 |
13.13s |
671 |
8.1x |
The repository also includes supplementary research tracks beyond the public README summary. Those are useful for future tuning and controller work, but the strongest public result from this deployment is the model's performance on grounded text work, structured outputs, closed-set vision, and multilingual OCR-style extraction.
- Every scenario is generated with a scenario document and a review rubric.
- Preflight checks validate both
thinking=falseandthinking=truefor:- basic chat
- structured JSON output
- tool-call emission and tool follow-up
- image requests
- Phase 1 captures full request and response artifacts, including:
- request payloads
- visible response text
- reasoning text when available
- tool calls
- raw SSE event streams and timelines
- token-usage data
- TTFT and end-to-end latency
- Prometheus metric deltas
- optional Jetson telemetry
- Semantic scoring is rubric-based rather than transport-based:
- exact-label matching for closed-set classification
- exact or constrained field validation for structured JSON tasks
- transcript-and-language checks for multilingual image-text extraction
- required-fact and prohibited-action checks for prose families
- Raw outputs are intended for local inspection. The public repo keeps the reproducible code and sanitized summaries, while large generated datasets and raw run artifacts remain local-only by default.
src/gemma_vllm_benchmark/: the harness package (runner, scoring, systems, maze, asset staging)tests/: offline test suite — validates manifests, corpora, and the deterministic maze/parsing logic without a vLLM endpointbenchmarks/manifest.yaml: workload definitions and scenario familiesconfigs/backends/: backend profiles for baseline, prefix caching, and image budgetsconfigs/generation_profiles.yaml: standardized generation settingsscripts/generate_assets.py: stages local benchmark assets from source datasetsscripts/preflight_smoke_test.py: preflight validation for chat, tools, structure, and imagescripts/run_smoke_benchmark.py: one-sample smoke run across workload familiesscripts/run_benchmark.py: main workload runnerscripts/summarize_results.py: workload summary generationscripts/run_systems_benchmark.py: systems benchmark runnerscripts/summarize_systems_results.py: systems summary generationscripts/run_maze_navigation.py: deterministic maze experiment runnerscripts/run_maze_navigation_smoke.py: maze smoke validationscripts/summarize_maze_navigation.py: maze run summarizationscripts/validate_suite.py: validates generated benchmark assetsclock_time_reading/README.md: clock experiment details and rubricmaze_navigation/README.md: maze experiment details and rubricdocs/systems/README.md: systems benchmark methodologydocs/gemma4_edge_blog_post.md: long-form blog-style summary of the benchmark
This repo is intended to be run from the repository root.
- Create an environment and install dependencies.
python3 -m venv .venv
source .venv/bin/activate
pip install -e .- Place local source datasets under
data/source_datasets/.
Expected local dataset folders:
data/source_datasets/cifar-10-batches-pydata/source_datasets/256_ObjectCategoriesdata/source_datasets/time-image-datasetclassificationdata/source_datasets/multilingual-image-text-translation
- Generate staged benchmark assets.
python3 scripts/generate_assets.py --image-tier medium
python3 scripts/validate_suite.py- Run preflight and smoke validation before the full workload.
python3 scripts/preflight_smoke_test.py --backend-config configs/backends/vllm_baseline.yaml --thinking both
python3 scripts/run_smoke_benchmark.py --backend-config configs/backends/vllm_baseline.yaml --thinking both- Run the main phase-one workload benchmark.
python3 scripts/run_benchmark.py \
--backend-config configs/backends/vllm_baseline.yaml \
--thinking both \
--repeats 3- Summarize results locally.
python3 scripts/summarize_results.py --run-dir outputs/live_runs/<run_id>Additional entry points:
- Clock benchmark:
python3 scripts/run_benchmark.py \
--backend-config configs/backends/vllm_image_280.yaml \
--family image_clock_time_reading \
--thinking both- Maze benchmark:
python3 scripts/run_maze_navigation_smoke.py --backend-config configs/backends/vllm_baseline.yaml --thinking both
python3 scripts/run_maze_navigation.py --backend-config configs/backends/vllm_baseline.yaml --thinking both- Systems benchmark:
python3 scripts/run_systems_benchmark.py \
--backend-config configs/backends/vllm_baseline.yaml \
--manifest systems/manifest.yamlThe public-facing repository is meant to contain:
- code
- configs
- manifests
- experiment docs
- sanitized summaries
The following are intentionally treated as local-only artifacts and are ignored by default:
- raw benchmark outputs under
outputs/ - staged image corpora under
data/image_corpora/ - original source datasets under
data/source_datasets/ - generated scenario docs under
docs/scenarios/
This keeps the public repo small, reproducible, and free of machine-specific traces such as absolute local paths, telemetry logs, and raw streaming artifacts.
pip install -e ".[dev]"
pre-commit install # optional
pytest -q # offline — no Jetson, GPU, or vLLM endpoint needed
ruff check . && ruff format --check .The test suite validates the benchmark manifests, corpora, backend configs, and the deterministic maze-navigation and parsing logic without contacting a model server. CI runs ruff and pytest on Python 3.10-3.13. See CONTRIBUTING.md for scope and guidelines.
If you use this harness or its results, please cite the repository — see CITATION.cff.
MIT — see LICENSE. Benchmark corpora under data/ are synthetic fixtures created for this project. Source image datasets (CIFAR-10, Caltech-256, and the clock and multilingual OCR sets) are not redistributed here; obtain them from their original distributions under their own licenses.

