In this repository you can find a set of benchmarkings with different model architectures from the ONNX Hub Models repository.
- ONNX Operators Frequency Usage
- ONNX Quantized Operators Frequency Usage
- Orion Compatibility Percentage and Missing Operators with Quantized ONNX Hub models
- Orion Compatibility Percentage with ONNX Hub models
- Transpiler + Oion Compatibility with ONNX Hub models
- Compilation time of Transpiled models from ONNX Hub
- Clone ONNX Hub Models repository:
git clone https://github.com/onnx/models.git
- Install Git LFS
brew install git-lfs
- Setup Git LFS
git lfs install
- Fetch models:
git lfs fetch
- Checkout models:
git lfs checkout
- Install dependencies:
poetry install
poetry run pip install keyring
poetry run pip install keyrings.google-artifactregistry-auth
- Get
smartonnx
repository configuration:
gcloud artifacts print-settings python --project=giza-platform \
--repository=smartonnx \
--location=europe-west1
- Install
smartonnx
:
pip install --index-url https://europe-west1-python.pkg.dev/giza-platform/smartonnx/simple/ smartonnx
- Get ONNX operator usage by frequency:
python orion_benchmark/operator_analytics.py
- Get ONNX operator usage by frequency for quantized models:
python orion_benchmark/quant_operator_analytics.py
- Get model percentage of compatibility with Orion Operators:
python orion_benchmark/operator_coverage.py >> orion_benchmark/operator_coverage.md
- Get model percentage of compatibility with Quant Orion Operators:
python orion_benchmark/quant_operator_coverage.py >> orion_benchmark/quant_operator_coverage.md
- Get transpilation time of supported ONNX Hub models with Orion:
python orion_benchmark/transpile_models.py