# react-native-executorch

> An easy way to run AI models in React Native with ExecuTorch

Latest version **0.10.2** (published 2026-09-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-executorch
pnpm add react-native-executorch
yarn add react-native-executorch
bun add react-native-executorch
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.10.2 |
| Published | 2026-09-11 |
| First published | 2023-02-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 5 |
| Unpacked size | 7 MB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 1685 |
| Author | Software Mansion |
| Maintainers | swm-bot, msluszniak |
| Keywords | text-to-speech, ocr, computer-vision, segmentation, object-detection, speech-to-text, vlm, image-embeddings, on-device-ai, text-embeddings, llm, ai, react-native, ios, android, executorch |

## Links

- npm: https://www.npmjs.com/package/react-native-executorch
- Repository: https://github.com/software-mansion/react-native-executorch
- Homepage: https://docs.swmansion.com/react-native-executorch
- Issues: https://github.com/software-mansion/react-native-executorch/issues
- npm.io page: https://npm.io/package/react-native-executorch

## Dependencies (5)

- [zod](https://npm.io/package/zod.md) ^4.3.6
- [jsonrepair](https://npm.io/package/jsonrepair.md) ^3.12.0
- [jsonschema](https://npm.io/package/jsonschema.md) ^1.5.0
- [@huggingface/jinja](https://npm.io/package/@huggingface/jinja.md) ^0.5.9
- [react-native-device-info](https://npm.io/package/react-native-device-info.md) ^15.0.2

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 0.10.2 (latest) — 2026-09-11
- 0.11.0-nightly-31f349c-20260914 (executorch-nightly) — 2026-09-14
- 0.9.3 (legacy) — 2026-08-03
- 0.5.1-rc.0 (rc) — 2025-08-21
- 0.11.0-nightly-31f349c-20260913 — 2026-09-13
- 0.11.0-nightly-31f349c-20260912 — 2026-09-12
- 0.11.0-nightly-59ac9ee-20260911 — 2026-09-11
- 0.11.0-nightly-c8f44f6-20260910 — 2026-09-10
- 0.10.1 — 2026-09-09
- 0.11.0-nightly-020e1d6-20260909 — 2026-09-09
- 0.10.0 — 2026-09-08
- 0.10.0-nightly-2558259-20260907 — 2026-09-07
- 0.10.0-nightly-2558259-20260906 — 2026-09-06
- 0.10.0-nightly-2558259-20260905 — 2026-09-05
- 0.10.0-nightly-2558259-20260904 — 2026-09-04
- … 321 more at https://npm.io/package/react-native-executorch/versions

## README

<div align="center">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://github.com/software-mansion/react-native-executorch/raw/main/docs/static/img/logo-vertical-dark.svg">
    <img src="https://github.com/software-mansion/react-native-executorch/raw/main/docs/static/img/logo-vertical.svg" alt="React Native ExecuTorch Logo" width="260">
  </picture>
</div>

<br />
<br />

<div align="center">
  <a href="https://swm-delivery.com/www/delivery/ck-slug.php?zoneid=zone-gh-react-native-executorch-1&n=1"><img src="https://swm-delivery.com/www/images/zone-gh-react-native-executorch-1?n=1" /></a>
  <a href="https://swm-delivery.com/www/delivery/ck-slug.php?zoneid=zone-gh-react-native-executorch-2&n=1"><img src="https://swm-delivery.com/www/images/zone-gh-react-native-executorch-2?n=1" /></a>
  <a href="https://swm-delivery.com/www/delivery/ck-slug.php?zoneid=zone-gh-react-native-executorch-3&n=1"><img src="https://swm-delivery.com/www/images/zone-gh-react-native-executorch-3?n=1" /></a>
  <a href="https://github.com/software-mansion/react-native-executorch/graphs/contributors"><img src="https://img.shields.io/github/contributors/software-mansion/react-native-executorch?style=for-the-badge&color=00008B" alt="GitHub - Contributors"></a>
  <a href="https://github.com/software-mansion/react-native-executorch/stargazers"><img src="https://img.shields.io/github/stars/software-mansion/react-native-executorch?style=for-the-badge&color=00008B" alt="GitHub - Stars"></a>
  <a href="https://discord.gg/ZGqqY55qkP"><img src="https://img.shields.io/badge/Discord-Join%20Us-00008B?logo=discord&logoColor=white&style=for-the-badge" alt="Join our Discord community"></a>
  <a href="https://docs.swmansion.com/react-native-executorch/"><img src="https://img.shields.io/badge/Documentation-00008B?logo=googledocs&logoColor=white&style=for-the-badge" alt="Documentation"></a>
  <a href="https://swmansion.com/contact">
    <img src="https://img.shields.io/badge/Hire%20Us-00008B?logo=react&logoColor=white&color=darkgreen&style=for-the-badge" alt="Hire Us">
  </a>
</div>

<br/>

**React Native ExecuTorch** is an on-device AI inference library for React Native, powered by [ExecuTorch](https://executorch.ai) — Meta's on-device inference runtime. It lets you run machine learning models directly on the user's phone with zero network calls, full offline capability, and guaranteed privacy. No data ever leaves the device.

The library ships with a curated set of pre-exported models covering computer vision, language models, text-to-speech, transcription, and more — all available in our [Hugging Face collection](https://huggingface.co/software-mansion/collections) and ready to use out of the box. You can also bring your own `.pte` models and plug them into existing pipelines or build entirely custom ones from scratch.

To explore all on-device capabilities in an interactive showcase app, check out the [React Native ExecuTorch Gallery](https://github.com/software-mansion-labs/react-native-executorch-gallery).

[![npm version](https://img.shields.io/npm/v/react-native-executorch?color=00008B)](https://www.npmjs.com/package/react-native-executorch)
[![npm nightly](https://img.shields.io/npm/v/react-native-executorch/executorch-nightly?label=nightly&color=00008B)](https://www.npmjs.com/package/react-native-executorch)
[![CI](https://github.com/software-mansion/react-native-executorch/actions/workflows/ci.yml/badge.svg)](https://github.com/software-mansion/react-native-executorch/actions/workflows/ci.yml)

## Table of Contents

- [Key Features](#key-features)
- [Quickstart](#quickstart)
  - [1. Installation](#1-installation)
  - [2. Run the Model](#2-run-the-model)
- [Documentation](#documentation)
- [Powered by React Native ExecuTorch](#powered-by-react-native-executorch)
- [Created by Software Mansion](#created-by-software-mansion)

## Key Features

- **Native Hardware Acceleration**: Optimized execution delegates across backends: **XNNPACK** (CPU), **Core ML** & **MLX** (Apple Silicon), and **Vulkan** (Android GPU).
- **100% Offline & Private**: Zero cloud inference costs and zero network dependency after model download. No user data ever leaves the device.
- **Two-Layer Architecture**:
  - **Ready-to-use Task Hooks (`use<Task>`)**: Out-of-the-box support for LLMs, computer vision, speech, and embeddings with automatic caching and lifecycle management.
  - **Lower-level Runtime & Custom Orchestration**: Build custom pipelines entirely in TypeScript using low-level tensor operations, fast native operators, schema validation, and worklet threading.
- **Pre-Exported Model Catalog**: Access verified models directly via the `models` registry and the [Software Mansion Hugging Face Collections](https://huggingface.co/software-mansion/collections).

## Quickstart

### 1. Installation

Install `react-native-executorch` alongside its required peer dependencies:

```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
```

> [!IMPORTANT]
> React Native ExecuTorch requires the **New React Native Architecture**, **React Native 0.81+** or **Expo SDK 54+** (using development builds), **iOS 17.0+**, and **Android 13+**.

### 2. Run the Model

```tsx
import { Button, View } from 'react-native';
import { models, useLLMChatSession } from 'react-native-executorch';

export function App() {
  const session = useLLMChatSession(models.llm.LFM2_5_1_2B.DEFAULT);

  const handleGenerate = async () => {
    if (!session.isReady || !session.sendMessage) return;

    const turn = await session.sendMessage(
      'Explain on-device AI in one sentence.',
      (token) => console.log(token)
    );

    console.log('Result messages:', turn.messages);
  };

  return (
    <View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
      <Button
        title={session.isReady ? 'Generate' : `Loading (${session.downloadProgress.toFixed(0)}%)`}
        onPress={handleGenerate}
        disabled={!session.isReady}
      />
    </View>
  );
}
```

## Documentation

Full documentation, guides, architecture deep dives, and API references are available at:
**[docs.swmansion.com/react-native-executorch](https://docs.swmansion.com/react-native-executorch/)**

- [Getting Started Guide](https://docs.swmansion.com/react-native-executorch/docs/fundamentals/getting-started)
- [Downloading & Caching Models](https://docs.swmansion.com/react-native-executorch/docs/fundamentals/downloading-models)
- [Task Extensions & Pipelines](https://docs.swmansion.com/react-native-executorch/docs/category/extensions)
- [Core Primitives & Custom Pipelines](https://docs.swmansion.com/react-native-executorch/docs/category/core--advanced)
- [Exporting Custom `.pte` Models](https://docs.swmansion.com/react-native-executorch/docs/core-and-advanced/exporting-custom-models)

## Powered by React Native ExecuTorch

React Native ExecuTorch powers [Private Mind](https://privatemind.swmansion.com/), a privacy-first mobile AI application available on [App Store](https://apps.apple.com/gb/app/private-mind/id6746713439) and [Google Play](https://play.google.com/store/apps/details?id=com.swmansion.privatemind).

<img width="2720" height="1085" alt="Private Mind promo" src="https://github.com/user-attachments/assets/b12296fe-19ac-48fc-9726-da9242700346" />

## Created by Software Mansion

Since 2012, [Software Mansion](https://swmansion.com) has been building mobile and web apps, contributing to open-source software, and dealing with all kinds of React Native challenges. We are Core React Native Contributors. We can help you build your next AI product – [Hire us](https://swmansion.com/contact?utm_source=react-native-executorch&utm_medium=readme).

[![swm](https://logo.swmansion.com/logo?color=white&variant=desktop&width=150&tag=react-native-executorch-github 'Software Mansion')](https://swmansion.com)

---
_Source: https://npm.io/package/react-native-executorch · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
