Reproducible Torch-TensorRT export and latency benchmarks for gated Hugging Face DINOv3 and SAM3 models.
This repository is a benchmark/reproduction project, not a model distribution. It does not ship model weights or generated TensorRT engines.
- DINOv3 ViT S+ / B / L Torch-TensorRT export and benchmark CLI
- SAM3 vision encoder Torch-TensorRT export and benchmark CLI
- SAM3 E2E component-sum measurement
- Scripts for setup, model cache warmup, and benchmark reproduction
- Local results from NVIDIA GeForce RTX 5070 Ti
./scripts/setup_uv.sh
uv run hf auth login
uv run python scripts/download_models.pyRun the DINOv3 suite:
./scripts/run_dinov3_benchmarks.shRun SAM3 vision and E2E component-sum measurements:
./scripts/run_sam3_vision_benchmark.sh
./scripts/run_sam3_e2e_component_sum.shSummary results are in RESULTS.md.
Key numbers from the local RTX 5070 Ti run:
| Target | Baseline | Torch-TensorRT | Speedup |
|---|---|---|---|
| DINOv3 ViT-S+ FP16 | 3.261 ms | 0.585 ms | 5.58x |
| DINOv3 ViT-B FP16 | 3.099 ms | 0.899 ms | 3.45x |
| DINOv3 ViT-L FP32 | 12.148 ms | 5.787 ms | 2.10x |
| SAM3 vision FP16 | 96.472 ms | 48.430 ms | 1.99x |
| SAM3 E2E component-sum | 123.675 ms | 74.662 ms | 1.66x |
Installed CLI entry points:
dinov3-trt-exportdinov3-trt-suitesam3-trt-visionsam3-e2e-component-sum
Use --help on any command for options.
The benchmark models are gated on Hugging Face. See MODEL_ACCESS.md.
Exact reproduction commands are in REPRODUCE.md.
Generated outputs go under artifacts/ and are ignored by git.
- TensorRT engines are hardware and software stack dependent.
- SAM3 full promptable segmentation is not exported as one TensorRT graph. The benchmark accelerates the static vision encoder path and sums unchanged E2E components separately.
- DINOv3 ViT-L FP16 produced NaN outputs in both eager and TensorRT in this environment; use the FP32 result for that model.
Code in this repository is MIT licensed. Model weights remain governed by their upstream licenses and access terms.