ExecuTorch on Android: what the LLM runner guide covers and what it marks experimental
Reader question: what does it take to run a model with ExecuTorch in an Android app, and how stable is it?
ExecuTorch is PyTorch's runtime for on-device models. Its Android LLM guide describes Java and Kotlin classes wrapped around a core C++ runtime, shipped in the executorch-android AAR. The guide itself calls the Java API experimental and subject to change.
What you need
- A model exported to ExecuTorch's
.pteformat, and a tokenizer file. The guide's example uses a Llama 3.2 instruct model and atokenizer.modelfile pushed to/data/local/tmp/. - The
executorch-androidlibrary in your app.
What the API gives you
- LlmModule loads a model, configures its tokenizer, streams tokens, and can be stopped from another thread.
- Load modes. File, memory-mapped (the default), and two memory-mapped modes that lock pages in memory with
mlock. Construction does not load the program, so the guide says to callload()first to avoid paying the cost on the first generation. - Model types. Text, or text plus vision. The guide says the multimodal constant is currently an alias for text plus vision.
- Images and audio. Pre-processed image data can be passed in, and the guide shows audio features such as mel spectrograms from a Whisper preprocessor.
- Callbacks. One call per generated token, a stats callback when generation ends, and an error callback with a runtime error code.
- Threading. Generation runs on the calling thread, so the guide says to call it off the main thread.
How it compares
It is a developer toolkit, not an app. For ready-made apps see PocketPal AI. For how ExecuTorch fits next to llama.cpp, MLC and LiteRT, see on-device LLM runtimes compared from their docs.
We did not build or run anything with it, and we found no speed figures on this page.
Sources
Checked: 27 Nov 2026. Figures change; confirm on the source before you rely on them.
Keep reading
- 8 GB vs 12 GB vs 16 GB phone for AI: which one should you buy?What each RAM tier lets you run, with the models, file sizes and the one-sentence verdict for each.
- AI-Benchmark ranking: what the columns mean, and what the top phones showReading the AI-Benchmark phone table: the score columns, five phones with their chip, RAM and AI Score as listed, and what the numbers cannot tell you about chat models.
- The airplane mode test: how to check a phone model is really offlineLoad a model on Wi-Fi, switch on airplane mode, send a prompt. The check VDF AI recommends and what it does and does not prove.
- Android local AI runtimes explained: MLC LLM, llama.cpp, ExecuTorch and moreA May 2026 guide lists five ways to run models on Android and warns about NNAPI deprecation, aggressive background killing and vendor-locked NPU tools. A secondary source, with caveats.