Skip to main content
Version: 0.10.0

react-native-executorch

React Native ExecuTorch is a high-performance, privacy-first on-device AI inference library for React Native, powered by PyTorch's ExecuTorch runtime.

It provides a layered architecture designed for different use cases:

  • React Hooks (use<Task>): Declarative hooks designed for UI components. They manage downloading remote model assets with progress tracking, compilation, and automatic native memory disposal on unmount.

  • Task APIs (create<Task>): Imperative, promise-based pipelines with built-in preprocessing and postprocessing. Ideal for background services, worklets, or apps needing manual lifecycle control.

  • Domain Utilities: Domain-specific low-level tools:

    • math: Native C++ tensor operations (softmax, sigmoid, argmax, gather, etc.).
    • cv: Image transformations (resizing, normalization, layout conversions), bounding box, quadrilateral, and keypoint helpers.
    • llm: Token-by-token text generation runner, chat template formatting, and function calling helpers.
    • nlp: Fast native HuggingFace tokenizers and privacy filter utilities.
    • speech: Text-to-speech phonemizers, sentence splitters, voice activity detection, and audio utilities.
  • Model Registry (models): A curated catalog of verified, hosted on-device AI models across LLMs, Computer Vision, Speech, and NLP. Provides download URLs, pre-tuned configurations, and label maps for out-of-the-box inference.

  • Resource Fetcher (download): Imperative asset downloader and caching engine with abort control, progress tracking, and deduplicated local storage.

  • Core Primitives (Model, Tensor, schema, wrapAsync, createResourceScope): Low-level building blocks for custom architectures: direct C++ tensor memory management, raw model execution, load-time shape/domain validation, worklet threading, and construction-time ownership of native resources.

Hooks

Models

Modules

Core / Functions

Core / Types

Core / Constants

CV / Tasks

CV / Types

CV / Constants

LLM / Tasks

LLM / Types

NLP / Tasks

NLP / Types

NLP / Constants

Speech / Tasks

Speech / Types

Speech / Constants

Utils / Functions

Utils / Types