Export and quantize SmolVLA for ONNX Runtime on Arm
Introduction
Set up the SmolVLA environment
Export and validate the SmolVLA ONNX model
Quantize SmolVLA to INT4 and compare it with FP32
Next Steps
Export and quantize SmolVLA for ONNX Runtime on Arm
Who is this for?
This is an advanced topic for machine learning developers who want to export and quantize a vision-language-action model for ONNX Runtime on Arm.
What will you learn?
Upon completion of this Learning Path, you will be able to:
- Export SmolVLA from PyTorch as an ONNX model
- Run and validate the FP32 ONNX model with ONNX Runtime on an Arm CPU
- Quantize eligible linear weights to INT4 and store them in a packed ONNX model
- Run the FP32 and INT4 models with identical inputs and compare their action outputs and ONNX Runtime latency
Prerequisites
Before starting, you will need the following:
- An Arm Linux system, such as an Arm cloud instance or Radxa Orion O6, with Python 3.12 installed and at least 50 GB of free storage
- Familiarity with Python, PyTorch, and Linux command-line tools
Summary
This summary was drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.
Frequently asked questions
These FAQs were drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.
work/onnx/fp32/model.onnx. The TorchAO converter writes the packed INT4 model to work/onnx/int4/smolvla-int4.onnx.PASS: ONNX Runtime matches PyTorch within atol=0.001 and rtol=0.001. You can also inspect work/onnx/fp32/validation.json to confirm the provider, output shape, and validation result.MatMul and Gemm operations with packed com.microsoft::MatMulNBits operations. The converter reports how many eligible linear operations it converted.