Skip to content

Repository files navigation

DINOv3 and SAM3 Torch-TensorRT Benchmarks

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.

What Is Included

  • 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

Quickstart

./scripts/setup_uv.sh
uv run hf auth login
uv run python scripts/download_models.py

Run the DINOv3 suite:

./scripts/run_dinov3_benchmarks.sh

Run SAM3 vision and E2E component-sum measurements:

./scripts/run_sam3_vision_benchmark.sh
./scripts/run_sam3_e2e_component_sum.sh

Results

Summary 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

Commands

Installed CLI entry points:

  • dinov3-trt-export
  • dinov3-trt-suite
  • sam3-trt-vision
  • sam3-e2e-component-sum

Use --help on any command for options.

Model Access

The benchmark models are gated on Hugging Face. See MODEL_ACCESS.md.

Reproduction

Exact reproduction commands are in REPRODUCE.md.

Generated outputs go under artifacts/ and are ignored by git.

Limitations

  • 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.

License

Code in this repository is MIT licensed. Model weights remain governed by their upstream licenses and access terms.

About

No description, website, or topics provided.

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages