executorch

On-device AI across mobile, embedded and edge for PyTorch

What is executorch?

On-device AI across mobile, embedded and edge for PyTorch

Overview of executorch

What it is

ExecuTorch is PyTorch's open source stack for running AI inference locally on devices such as phones, wearables, laptops, browsers, embedded systems, and microcontrollers. It allows users to start with a PyTorch model, capture it with torch.export, optimize it for target hardware, and run it through C++, Python, Swift/Objective-C, Kotlin/Java, or JavaScript APIs. ExecuTorch powers on-device experiences across Instagram, WhatsApp, Facebook, and Messenger, and runs AI features on Meta Quest and Ray-Ban Meta devices.

Key features

  • PyTorch-native workflow: works directly from torch.export, with PyTorch program metadata and source mappings available to export and debugging tools.
  • Partitioned hardware acceleration: delegates supported graph regions to CPU, GPU, NPU, or DSP backends while retaining portable CPU kernels for fallback.
  • One source model, explicit targets: reuses the PyTorch model and export flow, producing a backend-specific .pte file for each target that needs hardware specialization.
  • A runtime you can right-size: links only the operators, kernels, and delegates a deployment needs; selective build keeps only the required operator kernels.
  • Inspect, profile, and extend: uses ETDump, ETRecord, and numeric debugging, or adds custom operators and backends.
  • Versioned deployment contract: a .pte created with stable APIs is guaranteed to load and execute for at least one following non-patch runtime release.

Use cases

ExecuTorch is designed for on-device AI workloads including local LLM and agent building blocks (quantized text models, long context, tool calling, speculative decoding), voice (streaming and offline speech recognition, speech synthesis, voice activity detection, speaker diarization), multimodal (text, image, and audio runners; mobile vision-language models), computer vision (image classification, object detection, semantic segmentation, promptable segmentation), and embedded AI (Cortex-M CPU kernels, Ethos-U and NXP NPUs, Cadence DSPs, Zephyr, Arduino, Raspberry Pi Pico workflows).

Getting started

Install the latest stable Python package in a Python 3.11–3.15 environment: bash pip install executorch On Linux this is the CUDA build, matching the torch package on PyPI. On macOS and Windows it is the CPU build. For the CPU-only Linux build or another CUDA version, see the Getting Started documentation. Install a nightly built from main to use the newest features: bash pip install --upgrade --pre executorch torch --extra-index-url https://download.pytorch.org/whl/nightly/cpu For platform-specific setup (Android, iOS, embedded systems), see the Quick Start documentation.

License and pricing

The license is not stated in the provided metadata or README.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/pytorchexecutorch.svg)](https://yunodb.com/tools/pytorchexecutorch?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/pytorchexecutorch?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/pytorchexecutorch.svg" alt="Featured on YunoDB" height="20"></a>