software-mansion/react-native-executorch
High-performance, privacy-first on-device AI inference library for React Native, powered by PyTorch's ExecuTorch runtime
What it solves
It enables developers to run machine learning models directly on mobile devices within React Native applications. This eliminates the need for cloud-based inference, removing network latency, reducing server costs, and ensuring that user data never leaves the device for maximum privacy.
How it works
The library is powered by Meta's ExecuTorch runtime. It provides a two-layer architecture: a high-level layer with ready-to-use task hooks (like useLLMChatSession) for common AI tasks, and a low-level layer that allows developers to build custom pipelines using TypeScript, tensor operations, and worklet threading. It leverages native hardware acceleration via XNNPACK (CPU), Core ML and MLX (Apple Silicon), and Vulkan (Android GPU).
Who it’s for
React Native developers who want to integrate on-device AI capabilities—such as LLMs, computer vision, speech-to-text, and embeddings—into their mobile apps without relying on external APIs.
Highlights
- Hardware Accelerated: Supports Core ML, MLX, Vulkan, and XNNPACK for optimized performance.
- Privacy-First: 100% offline execution ensures no data is transmitted to the cloud.
- Pre-Exported Models: Includes a curated catalog of verified models available via Hugging Face.
- Flexible Implementation: Offers both simple task-based hooks and low-level primitives for custom
.ptemodel orchestration.
Related
- Project
- Project
- Project
- Project
- Project