GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - pytorch/executorch: On-device AI across mobile, embedded and edge for PyTorch

BranchesTags
Open more actions menu

Latest commit

 

History

15,040 Commits
15,040 Commits

Folders and files

NameName
Last commit message
Last commit date
.Package.swift
.Package.swift
 
 
.ci
.ci
 
 
.claude
.claude
 
 
.githooks
.githooks
 
 
.github
.github
 
 
.wiki
.wiki
 
 
backends
backends
 
 
codegen
codegen
 
 
configurations
configurations
 
 
data/bin
data/bin
 
 
desktop
desktop
 
 
devtools
devtools
 
 
docs
docs
 
 
examples
examples
 
 
exir
exir
 
 
export
export
 
 
extension
extension
 
 
frontends
frontends
 
 
kernels
kernels
 
 
profiler
profiler
 
 
runtime
runtime
 
 
schema
schema
 
 
scripts
scripts
 
 
shim @ 52196a3
shim @ 52196a3
 
 
shim_et
shim_et
 
 
src
src
 
 
test
test
 
 
third-party
third-party
 
 
tools
tools
 
 
util
util
 
 
website
website
 
 
zephyr
zephyr
 
 
.bandit.yaml
.bandit.yaml
 
 
.buckconfig
.buckconfig
 
 
.clang-format
.clang-format
 
 
.clang-tidy
.clang-tidy
 
 
.cmake-format.yaml
.cmake-format.yaml
 
 
.cmakelintrc
.cmakelintrc
 
 
.flake8
.flake8
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.gitmodules
.gitmodules
 
 
.lintrunner.toml
.lintrunner.toml
 
 
.mypy.ini
.mypy.ini
 
 
AGENTS.md
AGENTS.md
 
 
BUCK
BUCK
 
 
CLAUDE.md
CLAUDE.md
 
 
CMakeLists.txt
CMakeLists.txt
 
 
CMakePresets.json
CMakePresets.json
 
 
CODEOWNERS
CODEOWNERS
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
Package.swift
Package.swift
 
 
README-wheel.md
README-wheel.md
 
 
README.md
README.md
 
 
Test.cmake
Test.cmake
 
 
conftest.py
conftest.py
 
 
install_executorch.bat
install_executorch.bat
 
 
install_executorch.py
install_executorch.py
 
 
install_executorch.sh
install_executorch.sh
 
 
install_requirements.py
install_requirements.py
 
 
install_requirements.sh
install_requirements.sh
 
 
install_utils.py
install_utils.py
 
 
pyproject.toml
pyproject.toml
 
 
pytest-windows.ini
pytest-windows.ini
 
 
pytest.ini
pytest.ini
 
 
repro_mypy_ci.sh
repro_mypy_ci.sh
 
 
requirements-dev.txt
requirements-dev.txt
 
 
requirements-examples.txt
requirements-examples.txt
 
 
requirements-lintrunner.txt
requirements-lintrunner.txt
 
 
run_python_script.sh
run_python_script.sh
 
 
setup.py
setup.py
 
 
torch_pin.py
torch_pin.py
 
 
version.txt
version.txt
 
 

Repository files navigation

ExecuTorch logo mark

ExecuTorch

PyTorch-native AI inference from phones and laptops to microcontrollers

PyPI - Version GitHub - Contributors GitHub - Stars Discord - Chat with Us Documentation

ExecuTorch is PyTorch's open source stack for running AI locally on phones, wearables, laptops, browsers, embedded systems, and microcontrollers. 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, serving billions of people. It also runs AI features on Meta Quest and Ray-Ban Meta devices. See where ExecuTorch is shipping.

Important

Release channels: use the latest release with the stable documentation. This README tracks main; features labeled Main / nightly may change before release. Use the main documentation with a source checkout or nightly package.

Built for current edge workloads

Workload Representative capabilities Start here
Local LLM and agent building blocks Quantized text models, long context, tool calling, speculative decoding, multi-session execution, and an experimental OpenAI-compatible local server Muse Glimmer · LLM guide · LLM server
Voice Streaming and offline speech recognition, speech synthesis, voice activity detection, and speaker diarization Voxtral Realtime · Parakeet · Sortformer diarization · Voxtral TTS · Nemotron 3 Diarization
Multimodal Text, image, and audio runners; mobile vision-language models Gemma 4 · Multimodal runner
Computer vision Image classification, object detection, semantic segmentation, and promptable segmentation MobileNet V2 · YOLO26 · DeepLabV3 · EfficientSAM
Embedded AI Cortex-M CPU kernels, Ethos-U and NXP NPUs, Cadence DSPs, Zephyr, Arduino, and Raspberry Pi Pico workflows Embedded guide · Cortex-M · Arduino

These are starting points, not a compatibility list. A model does not need to appear here to run with ExecuTorch: use the standard export guide or adapt the closest model example. Deployment depends on torch.export capture plus operator, runtime, and selected-backend coverage; validate numerical accuracy, memory use, and performance on the target. For a new language-model architecture, see the custom LLM guide.

Why ExecuTorch

  • PyTorch-native workflow: work directly from torch.export, with PyTorch program metadata and source mappings available to export and debugging tools.
  • Partitioned hardware acceleration: delegate supported graph regions to CPU, GPU, NPU, or DSP backends while retaining portable CPU kernels for fallback.
  • One source model, explicit targets: reuse the PyTorch model and export flow, while producing a backend-specific .pte for each target that needs hardware specialization.
  • A runtime you can right-size: link only the operators, kernels, and delegates a deployment needs; selective build keeps only the required operator kernels.
  • Inspect, profile, and extend: use ETDump, ETRecord, and numeric debugging, or add 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; see the runtime compatibility and API lifecycle policies.

Install

Install the latest stable Python package in a Python 3.11–3.15 environment:

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 Getting Started.

Install a nightly built from main to use the newest features:

pip install --upgrade --pre executorch torch --extra-index-url https://download.pytorch.org/whl/nightly/cpu

torch is explicit because nightly ExecuTorch wheels do not declare it as a dependency. This command installs a CPU-only PyTorch nightly. On Linux with an NVIDIA GPU, select the nightly command matching your CUDA version in the PyTorch installation selector and use its nightly/cu* index instead; otherwise, pip can replace a CUDA-enabled PyTorch installation with the CPU build. ExecuTorch CUDA wheels are published for Linux only.

Backend export tools can require optional dependencies. For example, use pip install 'executorch[ethos_u]' for Ethos-U AOT export. Embedded toolchains, simulators, and target runtimes are installed separately.

For platform-specific setup (Android, iOS, embedded systems), see the Quick Start documentation for additional information.

The prebuilt Python wheel is published for Linux x86-64, Linux AArch64, macOS arm64, and Windows x86-64. Build from source for other hosts or custom configurations. Native integration is also available through:

  • Prebuilt C++ libraries, headers, and CMake package in current main/nightly Linux and macOS wheels
  • Android AAR from Maven Central
  • Apple frameworks through Swift Package Manager
  • Source builds and cross-compilation

Five-minute export and run

This complete example, from the quick-start pathway, exports a small model and lowers it to XNNPACK:

import torch
from executorch.exir import to_edge_transform_and_lower
from executorch.backends.xnnpack.partition.xnnpack_partitioner import XnnpackPartitioner
from executorch.runtime import Runtime

class Add(torch.nn.Module):
    def forward(self, x, y):
        return x + y

model = Add().eval()
sample_inputs = (torch.ones(1), torch.ones(1))

et_program = to_edge_transform_and_lower(
    torch.export.export(model, sample_inputs),
    partitioner=[XnnpackPartitioner()]
).to_executorch()

with open("add.pte", "wb") as f:
    f.write(et_program.buffer)

runtime = Runtime.get()
runtime_program = runtime.load_program("add.pte")
method = runtime_program.load_method("forward")
output = method.execute(sample_inputs)[0]

torch.testing.assert_close(output, model(*sample_inputs))
print("Output:", output)

Expected output: Output: tensor([2.]). This verifies export, XNNPACK lowering, serialization, loading, and execution on the host; measure performance again on the target device.

The resulting add.pte is specialized for the selected backend. Targeting Core ML, Qualcomm, or another accelerator requires that backend's dependencies, configuration, and a separate export, not a blind partitioner substitution. Continue with the Python runtime, C++ Module API, Android, or iOS.

Choose an export path

Starting point Recommended path Scope
PyTorch nn.Module Standard export and lowering Full backend choice; some models need decompositions or custom operators
Hugging Face PreTrainedModel Transformers ExecuTorch exporter Experimental programmatic XNNPACK/CUDA export; generation components require application orchestration
Optimized text or multimodal generation export_llm or Optimum ExecuTorch Tested recipes, quantization, tokenizers, and runner-specific metadata

Already have a compatible .pte? Browse the ExecuTorch Community, Arm AI model catalog filtered to ExecuTorch, or, where available, the linked model pages above. Match the model configuration, precision, backend, and runtime; a .pte built for one hardware delegate is not a universal model file.

Runtime and LLM APIs

Use C++, Python, Java/Kotlin, Swift/Objective-C, or JavaScript/WebAssembly for general .pte execution. Higher-level text and multimodal runners are available for C++, Python, Android, and Apple platforms.

Compare the runtime and LLM APIs for language-specific entry points and API maturity.

Platforms and hardware backends

Choose a backend based on target hardware, operator coverage, and deployment constraints. The linked guides document setup, supported hardware, and known limitations. These are representative paths; the backend documentation is authoritative. See also the Desktop guide.

Target Backends and integrations
Android XNNPACK CPU; Vulkan GPU; Qualcomm, MediaTek, Arm VGF, and Samsung Exynos accelerators
iOS / iPadOS XNNPACK CPU; Core ML; MLX on physical devices (experimental)
macOS XNNPACK; Core ML; experimental MLX, Metal/AOTInductor, and WebGPU paths
Linux XNNPACK; OpenVINO; experimental CUDA/AOTInductor, Vulkan, and WebGPU desktop paths
Windows XNNPACK; OpenVINO; experimental CUDA/AOTInductor and Vulkan desktop paths
Browser / WebAssembly Portable WebAssembly runtime and WebGPU (both experimental)
Embedded / MCU Arm Cortex-M with CMSIS-NN (beta); Arm Ethos-U; NXP eIQ Neutron; Cadence DSP; Zephyr and Arduino integrations

Documentation

  • Get started
  • Choose a platform
  • Choose a backend
  • Export and lower a model
  • Work with LLMs
  • Profile and debug
  • Runtime and LLM APIs
  • PTE/runtime compatibility policy
  • LLM benchmark dashboard
  • Troubleshooting

Community and contributing

  • GitHub Discussions: ask questions and share ideas
  • Discord: chat with maintainers and the community
  • Issues: report bugs or request features
  • Contributing guide: development setup, testing, and review guidelines

Citing ExecuTorch

Read the MLSys 2026 paper (PDF).

If you use ExecuTorch in research, please cite:

@article{executorch2026,
    title={{ExecuTorch} - A Unified {PyTorch} Solution to Run {AI} Models On-Device},
    author={Nachin, Mergen and Desai, Digant and Jia, Sicheng Stephen and Lai, Chen and Liu, Mengwei and Szwejbka, Jacob and Alvarez, Raziel and Ascani, RJ and Bort, Dave and Candales, Manuel and
  others},
    journal={arXiv preprint arXiv:2605.08195},
    url={https://arxiv.org/abs/2605.08195},
    year={2026}
  }

License

ExecuTorch is BSD licensed. See LICENSE.


Part of the PyTorch ecosystem

GitHub • Documentation

About

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

executorch.ai

Topics

deep-learningembeddedgpumachine-learningmobileneural-networktensor

Resources

Readme
License

Code of conduct

Code of conduct

Contributing

Contributing
Activity
Custom properties

Stars

5.2k stars

Watchers

76 watching

Forks

1.2k forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.