# Repository Briefing: software-mansion/react-native-executorch
> Source: https://repoforai.com/repo/software-mansion/react-native-executorch (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/software-mansion/react-native-executorch
- **Official Docs / Website**: https://executorch.swmansion.com
- **Category**: LLMs & Inference (大模型与推理微调)
- **Primary Language**: TypeScript
- **License**: See repository
- **Engineering Health**: B+ (75/100 · Maintenance 35/35 · Adoption 14/25 · Releases 20/20 · License 6/20)
- **Latest Release**: v0.11.1 (2026-11-19) — https://github.com/software-mansion/react-native-executorch/releases
- **Review Snapshot**: 2026-12-02
- **Deployment / Stack Signals**: Local AI, GPU
- **Momentum**: 1,801 ★ total (+1 24h / +4 7d) · 101 forks
- **Topics**: `ai`, `computer-vision`, `executorch`, `llm-inference`, `mobile-inference`, `object-detection`, `ocr`, `on-device-ai`, `react-native-ai`, `speech-to-text`, `text-to-speech`, `vlm`
- **When to Use**: Best for: 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. Skip if: You depend on Expo Go or older platform versions, or the required model cannot meet your memory and sustained performance budget on target devices.

## Overview
```text
### Architecture & 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.
```

## Key Capabilities
```text
- Integration: Task hooks manage model caching and lifecycle; useLLMChatSession exposes readiness, download progress, and streamed token callbacks.
- Custom execution: Compose tensor operations, native operators, schema validation, and worklet threading in TypeScript.
- Model packaging: The models registry exposes pre-exported artifacts; ExecuTorch Export Recipes provides a path from PyTorch to .pte.
- Hardware routing: XNNPACK for CPU, Core ML and MLX for Apple Silicon, Vulkan for Android GPU, and opt-in QNN for supported Snapdragon NPUs.
- Offline boundary: Inference runs locally once assets are present; the anonymous download event can be disabled with setTelemetryEnabled(false).
- Native compatibility: v0.11.5-libs rebuilt the Android arm64-v8a core to prevent a JNI SIGILL on ARMv8.0 CPUs.
```

## Quick Start / Clone
```bash
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
```
