Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -561,4 +561,5 @@ const handleGenerate = async () => {
| [SmolLM 2](https://huggingface.co/software-mansion/react-native-executorch-smolLm-2) | 135M, 360M, 1.7B | ✅ | - |
| [LLaMA 3.2](https://huggingface.co/software-mansion/react-native-executorch-llama-3.2) | 1B, 3B | ✅ | - |
| [LFM2.5](https://huggingface.co/software-mansion/react-native-executorch-lfm-2.5) | 350M, 1.2B, 1.6B-VL | ✅ | - |
| [LFM2.5-VL-450M](https://huggingface.co/software-mansion/react-native-executorch-lfm-2.5/tree/main/lfm2.5-VL-450M) | 450M | ✅ | vision |
| [LFM2.5-VL-1.6B](https://huggingface.co/software-mansion/react-native-executorch-lfm-2.5/tree/main/lfm2.5-VL-1.6B) | 1.6B | ✅ | vision |
Original file line number Diff line number Diff line change
Expand Up @@ -561,4 +561,5 @@ const handleGenerate = async () => {
| [SmolLM 2](https://huggingface.co/software-mansion/react-native-executorch-smolLm-2) | 135M, 360M, 1.7B | ✅ | - |
| [LLaMA 3.2](https://huggingface.co/software-mansion/react-native-executorch-llama-3.2) | 1B, 3B | ✅ | - |
| [LFM2.5](https://huggingface.co/software-mansion/react-native-executorch-lfm-2.5) | 350M, 1.2B, 1.6B-VL | ✅ | - |
| [LFM2.5-VL-450M](https://huggingface.co/software-mansion/react-native-executorch-lfm-2.5/tree/v0.8.0/lfm2.5-VL-450M) | 450M | ✅ | vision |
| [LFM2.5-VL-1.6B](https://huggingface.co/software-mansion/react-native-executorch-lfm-2.5/tree/v0.8.0/lfm2.5-VL-1.6B) | 1.6B | ✅ | vision |
2 changes: 1 addition & 1 deletion packages/react-native-executorch/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-executorch",
"version": "0.8.1",
"version": "0.8.2",
"description": "An easy way to run AI models in React Native with ExecuTorch",
"source": "./src/index.ts",
"main": "./lib/module/index.js",
Expand Down
25 changes: 21 additions & 4 deletions packages/react-native-executorch/src/constants/modelUrls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,13 @@ export const LFM2_5_350M_QUANTIZED = {

// LFM2.5-VL-1.6B
const LFM2_VL_1_6B_QUANTIZED_MODEL = `${URL_PREFIX}-lfm-2.5/${VERSION_TAG}/lfm2.5-VL-1.6B/quantized/lfm2_5_vl_1_6b_8da4w_xnnpack.pte`;
const LFM2_VL_TOKENIZER = `${URL_PREFIX}-lfm-2.5/${VERSION_TAG}/lfm2.5-VL-1.6B/tokenizer.json`;
const LFM2_VL_TOKENIZER_CONFIG = `${URL_PREFIX}-lfm-2.5/${VERSION_TAG}/lfm2.5-VL-1.6B/tokenizer_config.json`;
const LFM2_VL_1_6B_TOKENIZER = `${URL_PREFIX}-lfm-2.5/${VERSION_TAG}/lfm2.5-VL-1.6B/tokenizer.json`;
const LFM2_VL_1_6B_TOKENIZER_CONFIG = `${URL_PREFIX}-lfm-2.5/${VERSION_TAG}/lfm2.5-VL-1.6B/tokenizer_config.json`;

// LFM2.5-VL-450M
const LFM2_VL_450M_QUANTIZED_MODEL = `${URL_PREFIX}-lfm-2.5/${VERSION_TAG}/lfm2.5-VL-450M/lfm2_5_vl_450m_8da4w_xnnpack.pte`;
const LFM2_VL_450M_TOKENIZER = `${URL_PREFIX}-lfm-2.5/${VERSION_TAG}/lfm2.5-VL-450M/tokenizer.json`;
const LFM2_VL_450M_TOKENIZER_CONFIG = `${URL_PREFIX}-lfm-2.5/${VERSION_TAG}/lfm2.5-VL-450M/tokenizer_config.json`;

/**
* @category Models - VLM
Expand All @@ -443,8 +448,19 @@ export const LFM2_VL_1_6B_QUANTIZED = {
modelName: 'lfm2.5-vl-1.6b-quantized',
capabilities: ['vision'],
modelSource: LFM2_VL_1_6B_QUANTIZED_MODEL,
tokenizerSource: LFM2_VL_TOKENIZER,
tokenizerConfigSource: LFM2_VL_TOKENIZER_CONFIG,
tokenizerSource: LFM2_VL_1_6B_TOKENIZER,
tokenizerConfigSource: LFM2_VL_1_6B_TOKENIZER_CONFIG,
} as const;

/**
* @category Models - VLM
*/
export const LFM2_VL_450M_QUANTIZED = {
modelName: 'lfm2.5-vl-450m-quantized',
capabilities: ['vision'],
modelSource: LFM2_VL_450M_QUANTIZED_MODEL,
tokenizerSource: LFM2_VL_450M_TOKENIZER,
tokenizerConfigSource: LFM2_VL_450M_TOKENIZER_CONFIG,
} as const;

// Classification
Expand Down Expand Up @@ -1106,6 +1122,7 @@ export const MODEL_REGISTRY = {
LFM2_5_1_2B_INSTRUCT,
LFM2_5_1_2B_INSTRUCT_QUANTIZED,
LFM2_VL_1_6B_QUANTIZED,
LFM2_VL_450M_QUANTIZED,
EFFICIENTNET_V2_S,
EFFICIENTNET_V2_S_QUANTIZED,
SSDLITE_320_MOBILENET_V3_LARGE,
Expand Down
3 changes: 2 additions & 1 deletion packages/react-native-executorch/src/types/llm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ export type LLMModelName =
| 'lfm2.5-350m-quantized'
| 'lfm2.5-1.2b-instruct'
| 'lfm2.5-1.2b-instruct-quantized'
| 'lfm2.5-vl-1.6b-quantized';
| 'lfm2.5-vl-1.6b-quantized'
| 'lfm2.5-vl-450m-quantized';

/**
* Properties for initializing and configuring a Large Language Model (LLM) instance.
Expand Down
Loading