Rate this Page

API#

ExecuTorch has two runtime layers:

  • The core runtime loads and executes methods in a compatible .pte program. Use it when your application owns preprocessing, postprocessing, and task orchestration.

  • The LLM runner builds on the core runtime with tokenization, prefill and decode orchestration, sampling, and streaming generation for text and multimodal models.

The table below is the entry point for choosing a language binding. Maturity follows the API Life Cycle and Deprecation Policy: an API is stable unless it is explicitly marked experimental or deprecated. An annotation on an individual API takes precedence over this summary.

Runtime and LLM APIs by language#

Language / platform

Core runtime

LLM runner

Maturity

C++

Running an ExecuTorch Model Using the Module Extension in C++ for the high-level Module API, or Runtime API Reference for Program and Method

TextLLMRunner and MultimodalRunner

Core: stable; LLM: experimental

Python

Runtime Python API Reference for host-side loading, execution, and validation

Python LLM runner bindings, whose availability depends on the installed package or source build

Core: stable; LLM: experimental

Android: Java / Kotlin

Using ExecuTorch on Android and the Javadoc for Module, Tensor, and EValue

Running LLMs on Android for LlmModule

Core: experimental; LLM: experimental

Apple: Swift / Objective-C

Using ExecuTorch on iOS for Module, Tensor, and Value

Running LLMs on iOS for TextRunner and MultimodalRunner

Core: follows API Life Cycle and Deprecation Policy; LLM: experimental

Browser: JavaScript / WebAssembly

WebAssembly Module and Tensor, currently built from source

No high-level LLM runner API

Core: experimental

Use the core runtime for any compatible exported model, including vision, audio, and custom workloads. Use an LLM runner only when the exported program and tokenizer satisfy that runner’s model metadata and packaging requirements.

Export and reference documentation#