This folder contains examples of TIMM (PyTorch Image Models) optimization using Olive workflows, focusing on ONNX quantization with QuarkQuantization pass.
This example optimizes timm/mobilenetv3_small_100.lamb_in1k for CPU or NPU execution by:
-
Converting PyTorch model to ONNX
-
Applying ONNX quantization
-
Dataset: timm/mini-imagenet
The provided config.json configuration performs ONNX conversion and quantization.
Install Required Dependencies
pip install -r requirements.txt
olive run --config config.json --setupRun Model Optimization
olive run --config config.jsonAfter running the above command, the model candidates and corresponding config will be saved in the output directory.