# Prepare models for neural graphics with Arm neural technology

## In this learning path

- [Introduction](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/preparing-models-for-nt/)
- [Set up your environment](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/preparing-models-for-nt/1-setup/)
- [Create a reference model](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/preparing-models-for-nt/2-create-reference-model/)
- [Export the reference model with the ExecuTorch VGF backend](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/preparing-models-for-nt/3-convert-to-vgf-and-validate/)
- [Inspect the model in Model Explorer](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/preparing-models-for-nt/4-inspect-model-explorer/)
- [Inspect TOSA artifacts](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/preparing-models-for-nt/5-extract-tosa-artifacts/)
- [Next Steps](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/preparing-models-for-nt/_next-steps/)

## About this Learning Path

| Skill level:           | Advanced         |
|------------------------|------------------|
| Reading time:          | 45 min           |
| Last updated:          | 21 Aug 2026      |

| Author:                | Joshua Marshall-Law |
|------------------------|---------------------|
| Arm IP:                | [Mali](https://support.arm.com/?tab=compute-ip&Product%20Type=Graphics%20Processors) |
| Tags:                  | ML, Linux, macOS, ExecuTorch, PyTorch, Model Explorer, Jupyter Notebook, Vulkan, TOSA, NX |

### Who is this for?
This is an advanced topic for developers who want to understand and debug the model preparation flow used by Arm neural technology in neural graphics pipelines.

### What will you learn?
Upon completion of this Learning Path, you will be able to:
- Build and export a PyTorch model for ExecuTorch
- Generate `.vgf` artifacts with the ExecuTorch VGF backend
- Visualize model structure and generated artifacts using Model Explorer
- Inspect Tensor Operator Set Architecture (TOSA) intermediate representation when you need to debug operator lowering
- Validate the generated model with an ExecuTorch runner and connect it to ML Extensions for Vulkan workflows

### Prerequisites
Before starting, you will need the following:
- Basic PyTorch and Python experience
- A Linux machine or macOS machine with Apple Silicon
- Python version greater than 3.10 and less than 3.14, and Git installed

### Summary
You’ll prepare a PyTorch model for Arm neural technology by exporting a small `AddSigmoid` reference model with the ExecuTorch VGF backend. First, you’ll set up the required environment, generate `.vgf` and `.pte` artifacts, and optionally validate the `.pte` with the VKML runner. Then, you’ll inspect the artifacts in Model Explorer and extract TOSA artifacts to debug operator lowering, tensor layouts, and shape flow.

### Frequently asked questions
<details>
<summary>Which Python version do I need, and how do I check it before creating the environment?</summary>
Use Python 3.10 or later and earlier than 3.14. Run `python3 --version` and confirm that the reported version is in that range.
</details>

<details>
<summary>Why should I start with a minimal AddSigmoid model instead of a production NSS model?</summary>
Start with a small graph to make the export and conversion flow easier to inspect. You can validate PyTorch export, VGF generation, and artifact inspection before you move to a production NSS model.
</details>

<details>
<summary>How do I know the VGF export succeeded?</summary>
After you run `python export_vgf.py`, check for `.vgf` artifacts in `executorch-model/` and the generated `as-vgf.pte` file. For optional runtime validation, build the VKML runner and run `python run_vgf_pte.py`.
</details>

<details>
<summary>How should I launch Model Explorer, and what do I open first?</summary>
Install Model Explorer and the `pte-adapter-model-explorer`, `tosa-adapter-model-explorer`, and `vgf-adapter-model-explorer` packages in your active virtual environment. Run `model-explorer --extensions=pte_adapter_model_explorer,tosa_adapter_model_explorer,vgf_adapter_model_explorer`, then open a `.vgf` artifact in `executorch-model/` or `as-vgf.pte`.
</details>

<details>
<summary>When should I use TOSA for debugging?</summary>
Use TOSA to check operator lowering before backend compilation, confirm tensor layout and shape flow, or compare behavior when different backends produce different results.
</details>
