ONNX
onnxruntime
onnx-mlir
quantization
fp32

FP32 and Quantized Model ONNX/ONNX-MLIR Validation

This repository contains paired public FP32 and public quantized models and reproduces the following tasks.

  1. Convert the original models to ONNX.
  2. Run the models with ONNX Runtime and compare the outputs with the pre-conversion outputs.
  3. Generate Netron PNG images of the ONNX graphs.
  4. Convert ONNX to the ONNX-MLIR ONNX Dialect and, where possible, to lower-level IR.
  5. Generate graphs of the static MLIR operation order and SSA connections.
  6. Calculate the accuracy difference between the FP32 and quantized models on the same evaluation data.

Models

A total of 21 FP32/quantized model pairs are included.

Task Number of models
Vision classification 10
Keyword spotting 4
Semantic segmentation 3
Object detection 2
Anomaly detection 1
Language model 1

Model names, public URLs, licenses, and original-file SHA-256 checksums are listed in model_registry.csv.

Results

Result File
FP32/quantized accuracy and changes reports/accuracy/model_accuracy.csv
Converted ONNX and ONNX-MLIR status reports/conversion/pipeline_status.csv
ONNX-MLIR results by stage reports/conversion/ir_stage_coverage.csv
Quantization information preservation reports/conversion/quantization_preservation.csv
Netron ONNX graph generation and locations reports/graphs/netron/README.md
Execution-order IR graphs reports/graphs/mlir/mlir_ir_graph_report.md
ONNX-MLIR native output comparison reports/accuracy/onnx_mlir_output_check.csv

ONNX Dialect conversion succeeded for all 42/42 FP32 and quantized variants. Both the FP32 and quantized variants reached Affine/SCF/MemRef for 7/21 model pairs.

Directories

configs/        Model conversion, MLIR conversion, and accuracy evaluation configurations
environment/    Python, Netron, and ONNX-MLIR versions and installation scripts
models/         Per-model conversion outputs
reports/        Accuracy, conversion status, Netron, and IR graph results
research/       Public original models and source materials
scripts/        Conversion, evaluation, graph generation, and validation code
schemas/        Configuration and execution-result formats
tests/          Tests for reproducibility code

Reproduction

git lfs install
git lfs pull
make setup
make validate
make convert
make accuracy
make netron
make mlir
make mlir-graphs
make test

make mlir-graphs updates reports/conversion/ir_stage_coverage.csv using the checksums of the current MLIR results in models/, and then generates the graphs.

Individual scripts are documented in scripts/README.md, configuration files in configs/README.md, and result files in reports/README.md.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support