Skip to main content
You can convert ONNX models to LiteRT format and optimize them for on-device inference. Converting an ONNX model to LiteRT is a two-step process: ONNX → TensorFlow (SavedModel) → LiteRT

Convert an ONNX model to TensorFlow

Use the onnx-tf module to convert an ONNX model to a TensorFlow SavedModel. This is the commonly used and stable approach.
  1. Install the required dependencies:
  2. Convert the ONNX model to TensorFlow SavedModel format:

Convert TensorFlow to LiteRT

Convert the TensorFlow SavedModel to LiteRT format:

Quantize the model

To quantize the converted LiteRT model for improved performance on the NPU, see Quantize models using full integer quantization.