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
4 changes: 4 additions & 0 deletions apps/llm/components/llmModels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ import {
QWEN2_5_3B_QUANTIZED,
PHI_4_MINI_4B,
PHI_4_MINI_4B_QUANTIZED,
LFM2_5_350M,
LFM2_5_350M_QUANTIZED,
LFM2_5_1_2B_INSTRUCT,
LFM2_5_1_2B_INSTRUCT_QUANTIZED,
LLMProps,
Expand Down Expand Up @@ -79,6 +81,8 @@ export const LLM_MODELS: ModelOption<LLMModelSources>[] = [
{ label: 'Phi-4 Mini 4B', value: PHI_4_MINI_4B },
{ label: 'Phi-4 Mini 4B Quantized', value: PHI_4_MINI_4B_QUANTIZED },
// LFM2.5
{ label: 'LFM2.5 350M', value: LFM2_5_350M },
{ label: 'LFM2.5 350M Quantized', value: LFM2_5_350M_QUANTIZED },
{ label: 'LFM2.5 1.2B Instruct', value: LFM2_5_1_2B_INSTRUCT },
{
label: 'LFM2.5 1.2B Instruct Quantized',
Expand Down
20 changes: 10 additions & 10 deletions docs/docs/03-hooks/01-natural-language-processing/useLLM.md
Original file line number Diff line number Diff line change
Expand Up @@ -552,13 +552,13 @@ const handleGenerate = async () => {

## Available models

| Model Family | Sizes | Quantized | Capabilities |
| ------------------------------------------------------------------------------------------------------------ | :--------------: | :-------: | :----------: |
| [Hammer 2.1](https://huggingface.co/software-mansion/react-native-executorch-hammer-2.1) | 0.5B, 1.5B, 3B | ✅ | - |
| [Qwen 2.5](https://huggingface.co/software-mansion/react-native-executorch-qwen-2.5) | 0.5B, 1.5B, 3B | ✅ | - |
| [Qwen 3](https://huggingface.co/software-mansion/react-native-executorch-qwen-3) | 0.6B, 1.7B, 4B | ✅ | - |
| [Phi 4 Mini](https://huggingface.co/software-mansion/react-native-executorch-phi-4-mini) | 4B | ✅ | - |
| [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-1.2B-Instruct](https://huggingface.co/software-mansion/react-native-executorch-lfm2.5-1.2B-instruct) | 1.2B | ✅ | - |
| [LFM2.5-VL-1.6B](https://huggingface.co/software-mansion/react-native-executorch-lfm2.5-VL-1.6B) | 1.6B | ✅ | vision |
| Model Family | Sizes | Quantized | Capabilities |
| ------------------------------------------------------------------------------------------------------------------ | :-----------------: | :-------: | :----------: |
| [Hammer 2.1](https://huggingface.co/software-mansion/react-native-executorch-hammer-2.1) | 0.5B, 1.5B, 3B | ✅ | - |
| [Qwen 2.5](https://huggingface.co/software-mansion/react-native-executorch-qwen-2.5) | 0.5B, 1.5B, 3B | ✅ | - |
| [Qwen 3](https://huggingface.co/software-mansion/react-native-executorch-qwen-3) | 0.6B, 1.7B, 4B | ✅ | - |
| [Phi 4 Mini](https://huggingface.co/software-mansion/react-native-executorch-phi-4-mini) | 4B | ✅ | - |
| [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-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 @@ -552,13 +552,13 @@ const handleGenerate = async () => {

## Available models

| Model Family | Sizes | Quantized | Capabilities |
| ------------------------------------------------------------------------------------------------------------ | :--------------: | :-------: | :----------: |
| [Hammer 2.1](https://huggingface.co/software-mansion/react-native-executorch-hammer-2.1) | 0.5B, 1.5B, 3B | ✅ | - |
| [Qwen 2.5](https://huggingface.co/software-mansion/react-native-executorch-qwen-2.5) | 0.5B, 1.5B, 3B | ✅ | - |
| [Qwen 3](https://huggingface.co/software-mansion/react-native-executorch-qwen-3) | 0.6B, 1.7B, 4B | ✅ | - |
| [Phi 4 Mini](https://huggingface.co/software-mansion/react-native-executorch-phi-4-mini) | 4B | ✅ | - |
| [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-1.2B-Instruct](https://huggingface.co/software-mansion/react-native-executorch-lfm2.5-1.2B-instruct) | 1.2B | ✅ | - |
| [LFM2.5-VL-1.6B](https://huggingface.co/software-mansion/react-native-executorch-lfm2.5-VL-1.6B) | 1.6B | ✅ | vision |
| Model Family | Sizes | Quantized | Capabilities |
| -------------------------------------------------------------------------------------------------------------------- | :-----------------: | :-------: | :----------: |
| [Hammer 2.1](https://huggingface.co/software-mansion/react-native-executorch-hammer-2.1) | 0.5B, 1.5B, 3B | ✅ | - |
| [Qwen 2.5](https://huggingface.co/software-mansion/react-native-executorch-qwen-2.5) | 0.5B, 1.5B, 3B | ✅ | - |
| [Qwen 3](https://huggingface.co/software-mansion/react-native-executorch-qwen-3) | 0.6B, 1.7B, 4B | ✅ | - |
| [Phi 4 Mini](https://huggingface.co/software-mansion/react-native-executorch-phi-4-mini) | 4B | ✅ | - |
| [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-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 |
42 changes: 35 additions & 7 deletions packages/react-native-executorch/src/constants/modelUrls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,10 +380,10 @@ export const PHI_4_MINI_4B_QUANTIZED = {
} as const;

// LFM2.5-1.2B-Instruct
const LFM2_5_1_2B_INSTRUCT_MODEL = `${URL_PREFIX}-lfm2.5-1.2B-instruct/${VERSION_TAG}/original/lfm2_5_1_2b_fp16.pte`;
const LFM2_5_1_2B_INSTRUCT_QUANTIZED_MODEL = `${URL_PREFIX}-lfm2.5-1.2B-instruct/${VERSION_TAG}/quantized/lfm2_5_1_2b_8da4w.pte`;
const LFM2_5_1_2B_TOKENIZER = `${URL_PREFIX}-lfm2.5-1.2B-instruct/${VERSION_TAG}/tokenizer.json`;
const LFM2_5_1_2B_TOKENIZER_CONFIG = `${URL_PREFIX}-lfm2.5-1.2B-instruct/${VERSION_TAG}/tokenizer_config.json`;
const LFM2_5_1_2B_INSTRUCT_MODEL = `${URL_PREFIX}-lfm-2.5/${VERSION_TAG}/lfm2.5-1.2B-instruct/original/lfm2_5_1_2b_fp16.pte`;
const LFM2_5_1_2B_INSTRUCT_QUANTIZED_MODEL = `${URL_PREFIX}-lfm-2.5/${VERSION_TAG}/lfm2.5-1.2B-instruct/quantized/lfm2_5_1_2b_8da4w.pte`;
const LFM2_5_1_2B_TOKENIZER = `${URL_PREFIX}-lfm-2.5/${VERSION_TAG}/lfm2.5-1.2B-instruct/tokenizer.json`;
const LFM2_5_1_2B_TOKENIZER_CONFIG = `${URL_PREFIX}-lfm-2.5/${VERSION_TAG}/lfm2.5-1.2B-instruct/tokenizer_config.json`;

/**
* @category Models - LLM
Expand All @@ -405,10 +405,36 @@ export const LFM2_5_1_2B_INSTRUCT_QUANTIZED = {
tokenizerConfigSource: LFM2_5_1_2B_TOKENIZER_CONFIG,
} as const;

// LFM2.5-350M
const LFM2_5_350M_MODEL = `${URL_PREFIX}-lfm-2.5/${VERSION_TAG}/lfm2.5-350M/xnnpack/lfm2_5_350m_xnnpack_fp16.pte`;
const LFM2_5_350M_QUANTIZED_MODEL = `${URL_PREFIX}-lfm-2.5/${VERSION_TAG}/lfm2.5-350M/xnnpack/lfm2_5_350m_xnnpack_8w4da.pte`;
const LFM2_5_350M_TOKENIZER = `${URL_PREFIX}-lfm-2.5/${VERSION_TAG}/lfm2.5-350M/tokenizer.json`;
const LFM2_5_350M_TOKENIZER_CONFIG = `${URL_PREFIX}-lfm-2.5/${VERSION_TAG}/lfm2.5-350M/tokenizer_config.json`;

/**
* @category Models - LLM
*/
export const LFM2_5_350M = {
modelName: 'lfm2.5-350m',
modelSource: LFM2_5_350M_MODEL,
tokenizerSource: LFM2_5_350M_TOKENIZER,
tokenizerConfigSource: LFM2_5_350M_TOKENIZER_CONFIG,
} as const;

/**
* @category Models - LLM
*/
export const LFM2_5_350M_QUANTIZED = {
modelName: 'lfm2.5-350m-quantized',
modelSource: LFM2_5_350M_QUANTIZED_MODEL,
tokenizerSource: LFM2_5_350M_TOKENIZER,
tokenizerConfigSource: LFM2_5_350M_TOKENIZER_CONFIG,
} as const;

// LFM2.5-VL-1.6B
const LFM2_VL_1_6B_QUANTIZED_MODEL = `${URL_PREFIX}-lfm2.5-VL-1.6B/${VERSION_TAG}/quantized/lfm2_5_vl_1_6b_8da4w_xnnpack.pte`;
const LFM2_VL_TOKENIZER = `${URL_PREFIX}-lfm2.5-VL-1.6B/${VERSION_TAG}/tokenizer.json`;
const LFM2_VL_TOKENIZER_CONFIG = `${URL_PREFIX}-lfm2.5-VL-1.6B/${VERSION_TAG}/tokenizer_config.json`;
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`;

/**
* @category Models - VLM
Expand Down Expand Up @@ -1081,6 +1107,8 @@ export const MODEL_REGISTRY = {
QWEN2_5_3B_QUANTIZED,
PHI_4_MINI_4B,
PHI_4_MINI_4B_QUANTIZED,
LFM2_5_350M,
LFM2_5_350M_QUANTIZED,
LFM2_5_1_2B_INSTRUCT,
LFM2_5_1_2B_INSTRUCT_QUANTIZED,
LFM2_VL_1_6B_QUANTIZED,
Expand Down
2 changes: 2 additions & 0 deletions packages/react-native-executorch/src/types/llm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ export type LLMModelName =
| 'qwen2.5-3b-quantized'
| 'phi-4-mini-4b'
| 'phi-4-mini-4b-quantized'
| 'lfm2.5-350m'
| 'lfm2.5-350m-quantized'
| 'lfm2.5-1.2b-instruct'
| 'lfm2.5-1.2b-instruct-quantized'
| 'lfm2.5-vl-1.6b-quantized';
Expand Down
Loading