Who is this for?

This is an advanced topic for ML developers who want to reduce latency and memory bandwidth by exporting INT8 models to the `.vgf` file format using the ExecuTorch Arm backend.

What will you learn?

Upon completion of this Learning Path, you will be able to:

  • Explain when to use post-training quantization (PTQ) versus quantization-aware training (QAT)
  • Prepare and quantize a PyTorch model using TorchAO PT2E quantization APIs
  • Export the quantized model to TOSA and generate a model artifact with the ExecuTorch Arm backend
  • Validate the exported graph by visualizing it using Google's Model Explorer

Prerequisites

Before starting, you will need the following:

  • Basic PyTorch model training and evaluation experience
  • A development machine with Python 3.10+ and PyTorch installed that runs ExecuTorch

Summary

AI-assisted

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.

Close
?
You’ll use TorchAO and the ExecuTorch Arm backend to export INT8 .vgf artifacts from an image-to-image PyTorch model. First, you’ll set up the Python environment and run a CIFAR-10-based PTQ example, then extend it with QAT. Finally, you’ll inspect both exports in Model Explorer for layouts, operators, and tensor shapes before adapting the workflow to your model and calibration data.

Frequently asked questions

AI-assisted

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.

Close
?
How do I know the Arm backend export path worked?
Run the PTQ example and check ./output/ for an exported .vgf artifact. Open the artifact in Model Explorer with the VGF adapter and inspect the graph.
Where should the exported .vgf files appear?
Find the PTQ export in ./output/ and the QAT export in ./output_qat/. Open the exported .vgf files from those directories for inspection.
How should I decide between PTQ and QAT for my model?
PTQ optimizes for speed of iteration, while QAT optimizes for quality and robustness. Export both, inspect the graphs in Model Explorer, and compare outputs to choose a strategy that fits your accuracy and development needs.
What changes do I make to use my own model and data?
First, run the CIFAR-10 example to verify your environment. Then, adapt the PTQ or QAT export structure in quantize_and_export_vgf.py for your FP32 model, inference input, and representative calibration data or QAT fine-tuning loop.
What should I look for when inspecting the graph in Model Explorer?
Check for unexpected layout conversions, operators that you didn’t intend to run on your GPU path, and model I/O shapes that don’t match your integration. Use these findings before you integrate the .vgf artifact into your runtime.
Next