A deep learning optimization library for making distributed training and inference of large models easier and more efficient.
pytorch/executorch
PyTorch's on-device inference stack for running exported models on phones, laptops, browsers, and microcontrollers.
- Stars
- 5,107
- Forks
- 1,207
- Open issues
- 1,328
- Last commit
- 6 hours ago
What is it?
ExecuTorch takes a PyTorch model, captures it with torch.export, lowers it to a backend-specific .pte program for the target hardware, and runs that program through C++, Python, Swift/Objective-C, Kotlin/Java, or JavaScript APIs. It covers targets from phones and laptops down to embedded systems and microcontrollers.
Hardware acceleration is handled by partitioning: supported graph regions are delegated to CPU, GPU, NPU, or DSP backends such as XNNPACK, Core ML, Vulkan, Qualcomm, and Arm Ethos-U, while portable CPU kernels handle the rest. The runtime can be trimmed with selective build so that only the operators and delegates a deployment needs are linked. ETDump, ETRecord, and numeric debugging tools support profiling and accuracy checks.
The project also includes LLM, speech, and vision examples and an experimental local OpenAI-compatible server. Models run through the same export flow, but each target needs its own backend configuration and validation of accuracy and performance.
Key features
- 01Exports PyTorch models via torch.export into .pte programs for on-device execution.
- 02Delegates supported graph regions to XNNPACK, Core ML, Vulkan, Qualcomm, Arm and other backends.
- 03Provides C++, Python, Swift, Kotlin/Java and JavaScript runtime APIs.
- 04Supports selective build to include only the operators a deployment needs.
- 05Offers ETDump, ETRecord and numeric debugging for profiling and accuracy checks.
- 06Includes examples for LLMs, speech recognition, speech synthesis and computer vision.
Use cases
- Running a PyTorch vision or language model inside an Android or iOS app without a server.
- Deploying a neural network to a microcontroller or DSP with Arm Cortex-M or Ethos-U hardware.
- Shipping a local LLM or speech model in a desktop or laptop application.
- Comparing accuracy and latency of one model across several hardware backends.
Quick start
- 1
Install the latest stable Python package (Python 3.11–3.15)
pip install executorch - 2
Save the Add example from the README as a script and run it to export, lower to XNNPACK, and execute a model
Things to know
- Targeting Core ML, Qualcomm or other accelerators needs that backend's own dependencies and a separate export.
- Some features are experimental or labeled Main/nightly and may change before release.
- Nightly builds need a separate PyTorch nightly install, and CUDA wheels are Linux only.
- Prebuilt Python wheels cover only Linux x86-64, Linux AArch64, macOS arm64 and Windows x86-64; other hosts require a source build.
Topics
FAQ
- What is executorch?
- PyTorch's on-device inference stack for running exported models on phones, laptops, browsers, and microcontrollers. ExecuTorch takes a PyTorch model, captures it with torch.export, lowers it to a backend-specific .pte program for the target hardware, and runs that program through C++, Python, Swift/Objective-C, Kotlin/Java, or JavaScript APIs. It covers targets from phones and laptops down to embedded systems and microcontrollers.
- Is executorch free to use? What license does it have?
- executorch is open source under the Other license. Check the license terms before using it in commercial products.
- Is executorch still maintained?
- Actively maintained. The last commit to executorch was on Oct 20, 2026.
- What can I use executorch for?
- Running a PyTorch vision or language model inside an Android or iOS app without a server. Deploying a neural network to a microcontroller or DSP with Arm Cortex-M or Ethos-U hardware. Shipping a local LLM or speech model in a desktop or laptop application. Comparing accuracy and latency of one model across several hardware backends.
- How do I install executorch?
- Install the latest stable Python package (Python 3.11–3.15): pip install executorch Save the Add example from the README as a script and run it to export, lower to XNNPACK, and execute a model
- Where can I get executorch?
- The source code and installation instructions are on GitHub: https://github.com/pytorch/executorch
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
An end-to-end open source platform for building and deploying machine learning models, with Python and C++ APIs.
A fast, memory-efficient library and server for running and serving large language models with an OpenAI-compatible API.
Ultralytics YOLOv5, a PyTorch-based computer vision toolkit for object detection, instance segmentation and image classification with training and export.
Python library that runs large language models layer by layer so 70B-class models can infer on a single 4GB GPU, without quantization.
Official implementation of FlashAttention, a memory-efficient exact attention kernel for training and inference of Transformer models on GPUs.