software-mansion/react-native-executorch
Declarative way to run AI models in React Native on device, powered by ExecuTorch.
What it solves
It enables React Native developers to run AI models locally on mobile devices (iOS and Android) without needing deep expertise in native programming or machine learning. This allows for the creation of privacy-focused, on-device AI applications that don't rely on cloud APIs.
How it works
The library acts as a bridge between React Native and ExecuTorch (a framework by Meta designed for on-device AI execution). It provides a declarative API and hooks (like useLLM) to initialize and run models exported in the .pte format. It also supports resource fetching to handle model files on mobile platforms.
Who it’s for
Mobile app developers using React Native (specifically the New Architecture) who want to integrate local LLMs, computer vision, or speech models into their apps.
Highlights
- Broad Model Support: Out-of-the-box support for LLMs, computer vision, and speech-to-text/text-to-speech models.
- Declarative API: Simplifies model execution with easy-to-use hooks and a structured messaging format for chat.
- On-Device Execution: Powered by ExecuTorch for efficient performance on mobile phones and microcontrollers.
- Ready-made Models: Provides a set of pre-configured models to get started quickly.