Topophones

Home / Guides

ExecuTorch on Android: what the LLM runner guide covers and what it marks experimental

Updated 27 Nov 2026.

Cover graphic for: 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 .pte format, and a tokenizer file. The guide's example uses a Llama 3.2 instruct model and a tokenizer.model file pushed to /data/local/tmp/.
  • The executorch-android library 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 call load() 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

  1. Running LLMs on Android, ExecuTorch documentation (read 27 Nov 2026)

Checked: 27 Nov 2026. Figures change; confirm on the source before you rely on them.

Keep reading