software-mansion/react-native-executorch
ExecuTorch-backed on-device AI for React Native, from task hooks to custom pipelines
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
React Native ExecuTorch uses a TypeScript API over native C++ libraries backed by PyTorch's ExecuTorch runtime. The high-level task hooks select catalog models and manage caching and lifecycle. In the chat path, useLLMChatSession exposes download progress and readiness, then sendMessage returns the completed turn while delivering incremental output through a token callback. Inference executes in the native runtime on the phone.
The lower-level API lets application code compose tensor operations, native operators, schema validation, and worklet threading in TypeScript rather than forcing every pipeline through a task hook. A compatible .pte export is the model integration point. The Yarn-locked monorepo separates packages, apps, docs, and third-party code, with root prepare, lint, and typecheck scripts. Integration also requires react-native-worklets and react-native-blob-util.
Key Capabilities & Differentiators
Task coverage spans LLM chat, computer vision, speech, and embeddings. Teams can start with pre-exported models from the models registry, such as models.llm.LFM2_5_1_2B.DEFAULT, or use ExecuTorch Export Recipes to export their own PyTorch models to .pte. This gives teams a short path to a working baseline before taking on custom export and pipeline validation.
The runtime offers XNNPACK for CPU execution, Core ML and MLX on Apple Silicon, Vulkan for Android GPUs, and opt-in QNN on supported Snapdragon NPUs. These are deployment choices, not a guarantee that every export runs on every delegate. Validate the exact model and delegate together: the v0.11.3-libs Vulkan fix for RF-DETR keypoints addressed a reduction over more than 65,535 rows, illustrating why representative input shapes belong in device testing.
Trade-offs & Limitations
Compared with calling a hosted model API, local execution removes per-request cloud inference charges and keeps inference inputs on the phone, but shifts model distribution and runtime costs to the client. Test model storage, peak memory, sustained latency, and thermal behavior on representative phones. The model, input sizes, delegate, and overlapping work determine the practical budget; there is no useful SDK-wide RAM or VRAM figure.
Compared with integrating ExecuTorch natively, the hooks and TypeScript primitives reduce application-side glue for covered tasks, but do not remove native build requirements or backend-specific validation. Offline inference is not a blanket no-network guarantee: pre-exported model downloads send an anonymous event unless disabled. The root LICENSE file is present, but the license metadata is unspecified; verify the SDK, native binaries, and model redistribution terms before commercial release.
Hardware & Deployment Guide
Enable React Native's New Architecture and use React Native 0.83+ or Expo SDK 55+ with a development build; Expo Go cannot load the custom native libraries. Target iOS 17+ or Android 8.0+ (minSdkVersion 26). Install react-native-executorch with react-native-worklets 0.10+ and react-native-blob-util, and put react-native-worklets/plugin last in Babel's plugins array.
There is no inference server to operate, but a download-based install needs to provision model assets before going offline. The v0.11.4-libs release removed macOS metadata from the MLX iOS and Android Vulkan packages without changing their binaries. The v0.11.5-libs release rebuilt core-android-arm64-v8a so that JNI no longer inlines LSE atomics that caused SIGILL on ARMv8.0 CPUs. Track the native library revisions in your build and include older supported Android hardware in release testing.
React Native teams shipping offline chat, speech, or vision features that need to keep inference inputs on-device and can validate models on their supported phones.
You depend on Expo Go or older platform versions, or the required model cannot meet your memory and sustained performance budget on target devices.
Quick Start & Installation
npm install react-native-executorch react-native-worklets react-native-blob-util # or yarn add react-native-executorch react-native-worklets react-native-blob-util # or pnpm add react-native-executorch react-native-worklets react-native-blob-util
Comparison vs. Top LLMs & Inference Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| react-native-executorch ★ | 1.8k | +4 | TypeScript | — | ExecuTorch-backed on-device AI for React Native, from task hooks to custom pipel |
| ludwig | 11.8k | +6 | Python | Apache-2.0 | YAML-first framework for fine-tuning, training, and serving LLMs and multimodal |
| transformers | 169.6k | +337 | Python | Apache-2.0 | A PyTorch model-definition SDK for unified inference and training across modalit |
| openai-node | 11.3k | +14 | TypeScript | Apache-2.0 | Generated TypeScript SDK for integrating the hosted OpenAI API |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/software-mansion/react-native-executorch.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about react-native-executorch
How do I integrate a catalog model or bring my own?
How much memory do I need, and is a mobile GPU required?
Can I ship it commercially without running an inference server?
When should I use native ExecuTorch directly or choose a hosted API?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy