Skip to content

Commit 01f841b

Browse files
committed
docs
1 parent 4932515 commit 01f841b

File tree

1 file changed

+222
-0
lines changed

1 file changed

+222
-0
lines changed
Lines changed: 222 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,222 @@
1+
---
2+
title: Model Registry
3+
---
4+
5+
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.
6+
7+
## Usage
8+
9+
```typescript
10+
import { MODEL_REGISTRY, LLAMA3_2_1B } from 'react-native-executorch';
11+
```
12+
13+
### Accessing a model directly
14+
15+
Every model config is exported as a standalone constant:
16+
17+
```typescript
18+
import { LLAMA3_2_1B } from 'react-native-executorch';
19+
20+
const model = useExecutorchModule(LLAMA3_2_1B);
21+
```
22+
23+
### Listing all models
24+
25+
Use `MODEL_REGISTRY` to discover and enumerate all available models:
26+
27+
```typescript
28+
import { MODEL_REGISTRY } from 'react-native-executorch';
29+
30+
// Get all model names
31+
const names = Object.values(MODEL_REGISTRY.ALL_MODELS).map((m) => m.modelName);
32+
33+
// Find models by name
34+
const whisperModels = Object.values(MODEL_REGISTRY.ALL_MODELS).filter((m) =>
35+
m.modelName.includes('whisper')
36+
);
37+
```
38+
39+
## Model config shape
40+
41+
Each model config is a plain object with a `modelName` and one or more source URLs. The exact fields depend on the model type:
42+
43+
```typescript
44+
// Simple model (classification, segmentation, etc.)
45+
{
46+
modelName: 'efficientnet-v2-s',
47+
modelSource: 'https://...',
48+
}
49+
50+
// LLM (requires tokenizer)
51+
{
52+
modelName: 'llama-3.2-1b',
53+
modelSource: 'https://...',
54+
tokenizerSource: 'https://...',
55+
tokenizerConfigSource: 'https://...',
56+
}
57+
58+
// Speech-to-text (includes multilingual flag)
59+
{
60+
modelName: 'whisper-tiny',
61+
isMultilingual: true,
62+
modelSource: 'https://...',
63+
tokenizerSource: 'https://...',
64+
}
65+
66+
// Image generation (multiple model components)
67+
{
68+
modelName: 'bk-sdm-tiny-vpred-512',
69+
schedulerSource: 'https://...',
70+
tokenizerSource: 'https://...',
71+
encoderSource: 'https://...',
72+
unetSource: 'https://...',
73+
decoderSource: 'https://...',
74+
}
75+
```
76+
77+
## Available models
78+
79+
### Large Language Models (LLM)
80+
81+
| Constant | Model Name |
82+
| -------------------------------- | ------------------------------ |
83+
| `LLAMA3_2_3B` | llama-3.2-3b |
84+
| `LLAMA3_2_3B_QLORA` | llama-3.2-3b-qlora |
85+
| `LLAMA3_2_3B_SPINQUANT` | llama-3.2-3b-spinquant |
86+
| `LLAMA3_2_1B` | llama-3.2-1b |
87+
| `LLAMA3_2_1B_QLORA` | llama-3.2-1b-qlora |
88+
| `LLAMA3_2_1B_SPINQUANT` | llama-3.2-1b-spinquant |
89+
| `QWEN3_0_6B` | qwen3-0.6b |
90+
| `QWEN3_0_6B_QUANTIZED` | qwen3-0.6b-quantized |
91+
| `QWEN3_1_7B` | qwen3-1.7b |
92+
| `QWEN3_1_7B_QUANTIZED` | qwen3-1.7b-quantized |
93+
| `QWEN3_4B` | qwen3-4b |
94+
| `QWEN3_4B_QUANTIZED` | qwen3-4b-quantized |
95+
| `HAMMER2_1_0_5B` | hammer2.1-0.5b |
96+
| `HAMMER2_1_0_5B_QUANTIZED` | hammer2.1-0.5b-quantized |
97+
| `HAMMER2_1_1_5B` | hammer2.1-1.5b |
98+
| `HAMMER2_1_1_5B_QUANTIZED` | hammer2.1-1.5b-quantized |
99+
| `HAMMER2_1_3B` | hammer2.1-3b |
100+
| `HAMMER2_1_3B_QUANTIZED` | hammer2.1-3b-quantized |
101+
| `SMOLLM2_1_135M` | smollm2.1-135m |
102+
| `SMOLLM2_1_135M_QUANTIZED` | smollm2.1-135m-quantized |
103+
| `SMOLLM2_1_360M` | smollm2.1-360m |
104+
| `SMOLLM2_1_360M_QUANTIZED` | smollm2.1-360m-quantized |
105+
| `SMOLLM2_1_1_7B` | smollm2.1-1.7b |
106+
| `SMOLLM2_1_1_7B_QUANTIZED` | smollm2.1-1.7b-quantized |
107+
| `QWEN2_5_0_5B` | qwen2.5-0.5b |
108+
| `QWEN2_5_0_5B_QUANTIZED` | qwen2.5-0.5b-quantized |
109+
| `QWEN2_5_1_5B` | qwen2.5-1.5b |
110+
| `QWEN2_5_1_5B_QUANTIZED` | qwen2.5-1.5b-quantized |
111+
| `QWEN2_5_3B` | qwen2.5-3b |
112+
| `QWEN2_5_3B_QUANTIZED` | qwen2.5-3b-quantized |
113+
| `PHI_4_MINI_4B` | phi-4-mini-4b |
114+
| `PHI_4_MINI_4B_QUANTIZED` | phi-4-mini-4b-quantized |
115+
| `LFM2_5_1_2B_INSTRUCT` | lfm2.5-1.2b-instruct |
116+
| `LFM2_5_1_2B_INSTRUCT_QUANTIZED` | lfm2.5-1.2b-instruct-quantized |
117+
118+
### Vision Language Models (VLM)
119+
120+
| Constant | Model Name |
121+
| ------------------------ | ------------------------ |
122+
| `LFM2_VL_1_6B_QUANTIZED` | lfm2.5-vl-1.6b-quantized |
123+
124+
### Classification
125+
126+
| Constant | Model Name |
127+
| ----------------------------- | --------------------------- |
128+
| `EFFICIENTNET_V2_S` | efficientnet-v2-s |
129+
| `EFFICIENTNET_V2_S_QUANTIZED` | efficientnet-v2-s-quantized |
130+
131+
### Object Detection
132+
133+
| Constant | Model Name |
134+
| -------------------------------- | ------------------------------ |
135+
| `SSDLITE_320_MOBILENET_V3_LARGE` | ssdlite-320-mobilenet-v3-large |
136+
| `RF_DETR_NANO` | rf-detr-nano |
137+
138+
### Style Transfer
139+
140+
| Constant | Model Name |
141+
| ---------------------------------------- | -------------------------------------- |
142+
| `STYLE_TRANSFER_CANDY` | style-transfer-candy |
143+
| `STYLE_TRANSFER_CANDY_QUANTIZED` | style-transfer-candy-quantized |
144+
| `STYLE_TRANSFER_MOSAIC` | style-transfer-mosaic |
145+
| `STYLE_TRANSFER_MOSAIC_QUANTIZED` | style-transfer-mosaic-quantized |
146+
| `STYLE_TRANSFER_RAIN_PRINCESS` | style-transfer-rain-princess |
147+
| `STYLE_TRANSFER_RAIN_PRINCESS_QUANTIZED` | style-transfer-rain-princess-quantized |
148+
| `STYLE_TRANSFER_UDNIE` | style-transfer-udnie |
149+
| `STYLE_TRANSFER_UDNIE_QUANTIZED` | style-transfer-udnie-quantized |
150+
151+
### Speech to Text
152+
153+
| Constant | Model Name |
154+
| ---------------------------- | -------------------------- |
155+
| `WHISPER_TINY_EN` | whisper-tiny-en |
156+
| `WHISPER_TINY_EN_QUANTIZED` | whisper-tiny-en-quantized |
157+
| `WHISPER_BASE_EN` | whisper-base-en |
158+
| `WHISPER_BASE_EN_QUANTIZED` | whisper-base-en-quantized |
159+
| `WHISPER_SMALL_EN` | whisper-small-en |
160+
| `WHISPER_SMALL_EN_QUANTIZED` | whisper-small-en-quantized |
161+
| `WHISPER_TINY` | whisper-tiny |
162+
| `WHISPER_BASE` | whisper-base |
163+
| `WHISPER_SMALL` | whisper-small |
164+
165+
### Semantic Segmentation
166+
167+
| Constant | Model Name |
168+
| ----------------------------------------- | --------------------------------------- |
169+
| `DEEPLAB_V3_RESNET50` | deeplab-v3-resnet50 |
170+
| `DEEPLAB_V3_RESNET101` | deeplab-v3-resnet101 |
171+
| `DEEPLAB_V3_MOBILENET_V3_LARGE` | deeplab-v3-mobilenet-v3-large |
172+
| `LRASPP_MOBILENET_V3_LARGE` | lraspp-mobilenet-v3-large |
173+
| `FCN_RESNET50` | fcn-resnet50 |
174+
| `FCN_RESNET101` | fcn-resnet101 |
175+
| `DEEPLAB_V3_RESNET50_QUANTIZED` | deeplab-v3-resnet50-quantized |
176+
| `DEEPLAB_V3_RESNET101_QUANTIZED` | deeplab-v3-resnet101-quantized |
177+
| `DEEPLAB_V3_MOBILENET_V3_LARGE_QUANTIZED` | deeplab-v3-mobilenet-v3-large-quantized |
178+
| `LRASPP_MOBILENET_V3_LARGE_QUANTIZED` | lraspp-mobilenet-v3-large-quantized |
179+
| `FCN_RESNET50_QUANTIZED` | fcn-resnet50-quantized |
180+
| `FCN_RESNET101_QUANTIZED` | fcn-resnet101-quantized |
181+
| `SELFIE_SEGMENTATION` | selfie-segmentation |
182+
183+
### Instance Segmentation
184+
185+
| Constant | Model Name |
186+
| ------------------ | --------------- |
187+
| `YOLO26N_SEG` | yolo26n-seg |
188+
| `YOLO26S_SEG` | yolo26s-seg |
189+
| `YOLO26M_SEG` | yolo26m-seg |
190+
| `YOLO26L_SEG` | yolo26l-seg |
191+
| `YOLO26X_SEG` | yolo26x-seg |
192+
| `RF_DETR_NANO_SEG` | rfdetr-nano-seg |
193+
194+
### Image Embeddings
195+
196+
| Constant | Model Name |
197+
| --------------------------------------- | ------------------------------------- |
198+
| `CLIP_VIT_BASE_PATCH32_IMAGE` | clip-vit-base-patch32-image |
199+
| `CLIP_VIT_BASE_PATCH32_IMAGE_QUANTIZED` | clip-vit-base-patch32-image-quantized |
200+
201+
### Text Embeddings
202+
203+
| Constant | Model Name |
204+
| ---------------------------- | -------------------------- |
205+
| `ALL_MINILM_L6_V2` | all-minilm-l6-v2 |
206+
| `ALL_MPNET_BASE_V2` | all-mpnet-base-v2 |
207+
| `MULTI_QA_MINILM_L6_COS_V1` | multi-qa-minilm-l6-cos-v1 |
208+
| `MULTI_QA_MPNET_BASE_DOT_V1` | multi-qa-mpnet-base-dot-v1 |
209+
| `CLIP_VIT_BASE_PATCH32_TEXT` | clip-vit-base-patch32-text |
210+
211+
### Image Generation
212+
213+
| Constant | Model Name |
214+
| ----------------------- | --------------------- |
215+
| `BK_SDM_TINY_VPRED_512` | bk-sdm-tiny-vpred-512 |
216+
| `BK_SDM_TINY_VPRED_256` | bk-sdm-tiny-vpred-256 |
217+
218+
### Voice Activity Detection
219+
220+
| Constant | Model Name |
221+
| ---------- | ---------- |
222+
| `FSMN_VAD` | fsmn-vad |

0 commit comments

Comments
 (0)