Skip to main content
Version: 0.8.x

Model Registry

The Model Registry is a collection of all pre-configured model definitions shipped with React Native ExecuTorch. Each entry contains the model's name and all source URLs needed to download and run it, so you don't have to manage URLs manually.

Usage

import { MODEL_REGISTRY, LLAMA3_2_1B } from 'react-native-executorch';

Accessing a model directly

Every model config is exported as a standalone constant:

import { LLAMA3_2_1B } from 'react-native-executorch';

const llm = useLLM({ model: LLAMA3_2_1B });

Listing all models

Use MODEL_REGISTRY to discover and enumerate all available models:

import { MODEL_REGISTRY } from 'react-native-executorch';

// Get all model names
const names = Object.values(MODEL_REGISTRY.ALL_MODELS).map((m) => m.modelName);

// Find models by name
const whisperModels = Object.values(MODEL_REGISTRY.ALL_MODELS).filter((m) =>
m.modelName.includes('whisper')
);