ExecuTorch Export
Official PyTorch guidance for exporting and lowering models into the ExecuTorch format.
- Skill Road
- ExecuTorch Export
Categories
ExecuTorch Export is an official skill from the PyTorch repository. It supports the concrete transition from an evaluated PyTorch model to an ExecuTorch program that can be prepared for edge execution and serialized as a PTE file. The primary source is maintained in the official ExecuTorch source tree at .claude/skills/export. According to the provider, the workflow connects torch.export.export with to_edge_transform_and_lower and to_executorch. The skill is therefore a focused workflow guide for a coding agent, not a standalone compiler, model hosting service, or replacement for the ExecuTorch runtime.
Purpose and output
The export process starts with a model that can be instantiated in Python and example inputs whose structure matches the forward call. The model should be placed in evaluation mode for inference. An Exported Program is then produced. ExecuTorch takes that program into an edge representation, applies transformations and partitioners appropriate for a target device, and produces an executable program. Serialization writes the binary data to a PTE file. The official documentation explains that this result is specialized for the selected backend. Teams supporting several hardware targets will therefore commonly generate a separate export output for each target.
Backend, shapes, and preparation
Backend selection is an engineering decision rather than a simple skill setting. XNNPACK can serve mobile CPU scenarios, while Core ML, Vulkan, and other official backends have their own requirements and different operator coverage. Unsupported model portions can fall back to portable CPU execution. That makes incremental acceleration possible, but it can also change expected performance. A responsible workflow considers backend documentation, target hardware, and actual operator support together.
Example inputs describe fixed shapes by default. Models that must accept varying input sizes require dynamic shapes with named dimensions and defensible lower and upper bounds. Excessively broad upper bounds can increase memory requirements, so the provider advises choosing bounds that reflect the real operating range. Stateful models, complex control flow, and autoregressive generation may require additional work. A successful export is consequently not by itself evidence of accuracy or production readiness.
Validation and boundaries
Before integrating native runtime code, the PTE program can be loaded on the development platform and checked with the ExecuTorch runtime API. Tests should compare outputs, shapes, and the relevant target conditions. Specialized backends may require additional hardware or simulators. The skill does not promise universal conversion of arbitrary models and does not automatically repair unsupported operators. It also does not replace review of licensing rights, model data, privacy, or security requirements for a particular deployment. Inputs and exported artifacts should be handled only in approved working locations.
Position for Claude Code
The skill fits Claude Code when a person needs to prepare, understand, or validate a PyTorch export for ExecuTorch. It provides a reusable sequence and points toward model-specific and backend-specific examples. Environment setup and compilation are intentionally outside this entry. The previously reviewed setup skill concerns the development environment, while building concerns source compilation and C++ artifacts. Export is distinct because it describes the durable model-conversion and artifact-generation capability that users need independently of a particular repository maintenance task.
- Provider
- PyTorch
- License
- BSD-3-Clause
- Last reviewed
- 09.09.2026
Repository and documentation
Categories
Compatible with
Related guides
Guides and background related to this entry.
Set up the Fakechat plugin for Claude Code
Install the Fakechat plugin, start Claude Code with the channels flag, and test messages and files through a local browser interface.
30.09.2026
Setting up Laravel Boost
Install Laravel Boost in a Laravel application and connect it to Claude Code, Cursor, or Codex.
29.09.2026
Set up the Azure DevOps MCP Server
Start Set up the Azure DevOps MCP Server with verified links, minimal permissions, and a safe first test.
25.09.2026
Installing a Claude Code plugin
Installing a plugin from the official Anthropic marketplace – using the Code Review plugin as an example.
24.09.2026