Run LLMs and Vision Models in React Native Without Native Code
It wraps Meta’s ExecuTorch engine in declarative React hooks so mobile developers can run local AI models without writing native modules or becoming ML engineers.
What it does
React Native ExecuTorch is a bridge between React Native and Meta’s ExecuTorch runtime, letting you run AI models—LLMs, computer vision, speech, and embeddings—directly on iOS and Android using familiar declarative hooks. It handles the native platform plumbing so you don’t have to manage the ExecuTorch runtime or hand-write platform-specific loading code. The library targets privacy-first, offline use cases where cloud round-trips are undesirable or impossible.
The interesting bit
The library bets entirely on React Native’s New Architecture, exposing the native ExecuTorch engine through declarative hooks. It also ships with ready-made model configurations and a companion Expo resource fetcher, effectively treating on-device inference as just another async state management problem.
Key highlights
- Supports on-device LLM chat, computer vision, OCR, speech-to-text, text-to-speech, and embedding models via included configurations.
- Provides declarative hooks like
useLLMthat abstract model loading, generation, and resource fetching. - Includes demo apps for chat, speech, vision, and semantic search, plus a bare React Native example.
- Custom models are possible but must be manually exported to ExecuTorch’s
.pteformat first. - Requires iOS 17+, Android 13+, and React Native’s New Architecture.
Caveats
- Supports only the New React Native Architecture, so legacy apps are left behind.
- Running LLMs demands significant RAM; the README warns that emulators may crash without enough memory allocated.
- Custom model support is BYO-export: you’ll need to convert your own models to
.ptevia Python tooling before they’ll load.
Verdict
Worth evaluating if you’re a React Native team shipping privacy-centric AI features and you’ve already migrated to the New Architecture. If you’re on the legacy bridge or need to support older OS versions, this isn’t your stop.
Frequently asked
- What is software-mansion/react-native-executorch?
- It wraps Meta’s ExecuTorch engine in declarative React hooks so mobile developers can run local AI models without writing native modules or becoming ML engineers.
- Is react-native-executorch open source?
- Yes — software-mansion/react-native-executorch is an open-source project tracked on heatdrop.
- What language is react-native-executorch written in?
- software-mansion/react-native-executorch is primarily written in C++.
- How popular is react-native-executorch?
- software-mansion/react-native-executorch has 1.7k stars on GitHub.
- Where can I find react-native-executorch?
- software-mansion/react-native-executorch is on GitHub at https://github.com/software-mansion/react-native-executorch.