Skip to content

Commit 6794e21

Browse files
authored
chore: add support for lfm-2.5 instruct model (#822)
## Description Adds support for fm-2.5 instruct model. ### Introduces a breaking change? - [ ] Yes - [x] No ### Type of change - [ ] Bug fix (change which fixes an issue) - [ ] New feature (change which adds functionality) - [ ] Documentation update (improves or adds clarity to existing documentation) - [x] Other (chores, tests, code style improvements etc.) ### Tested on - [x] iOS - [x] Android ### Testing instructions Run llm example app with model changed from `LLAMA3_2_1B_SPINQUANT` to both `LFM2_5_1_2B_INSTRUCT` and `LFM2_5_1_2B_INSTRUCT_QUANTIZED`. Also check that Hugging Face page for the model is correct and contains every needed information: https://huggingface.co/software-mansion/react-native-executorch-lfm2.5-1.2B-instruct. ### Screenshots <!-- Add screenshots here, if applicable --> ### Related issues Closes #812 ### Checklist - [x] I have performed a self-review of my code - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have updated the documentation accordingly - [x] My changes generate no new warnings ### Additional notes <!-- Include any additional information, assumptions, or context that reviewers might need to understand this PR. -->
1 parent 949985e commit 6794e21

30 files changed

+99
-34
lines changed

docs/docs/03-hooks/01-natural-language-processing/useLLM.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -408,11 +408,12 @@ Depending on selected model and the user's device generation speed can be above
408408

409409
## Available models
410410

411-
| Model Family | Sizes | Quantized |
412-
| ---------------------------------------------------------------------------------------- | :--------------: | :-------: |
413-
| [Hammer 2.1](https://huggingface.co/software-mansion/react-native-executorch-hammer-2.1) | 0.5B, 1.5B, 3B ||
414-
| [Qwen 2.5](https://huggingface.co/software-mansion/react-native-executorch-qwen-2.5) | 0.5B, 1.5B, 3B ||
415-
| [Qwen 3](https://huggingface.co/software-mansion/react-native-executorch-qwen-3) | 0.6B, 1.7B, 4B ||
416-
| [Phi 4 Mini](https://huggingface.co/software-mansion/react-native-executorch-phi-4-mini) | 4B ||
417-
| [SmolLM 2](https://huggingface.co/software-mansion/react-native-executorch-smolLm-2) | 135M, 360M, 1.7B ||
418-
| [LLaMA 3.2](https://huggingface.co/software-mansion/react-native-executorch-llama-3.2) | 1B, 3B ||
411+
| Model Family | Sizes | Quantized |
412+
| ------------------------------------------------------------------------------------------------------------ | :--------------: | :-------: |
413+
| [Hammer 2.1](https://huggingface.co/software-mansion/react-native-executorch-hammer-2.1) | 0.5B, 1.5B, 3B ||
414+
| [Qwen 2.5](https://huggingface.co/software-mansion/react-native-executorch-qwen-2.5) | 0.5B, 1.5B, 3B ||
415+
| [Qwen 3](https://huggingface.co/software-mansion/react-native-executorch-qwen-3) | 0.6B, 1.7B, 4B ||
416+
| [Phi 4 Mini](https://huggingface.co/software-mansion/react-native-executorch-phi-4-mini) | 4B ||
417+
| [SmolLM 2](https://huggingface.co/software-mansion/react-native-executorch-smolLm-2) | 135M, 360M, 1.7B ||
418+
| [LLaMA 3.2](https://huggingface.co/software-mansion/react-native-executorch-llama-3.2) | 1B, 3B ||
419+
| [LFM2.5-1.2B-Instruct](https://huggingface.co/software-mansion/react-native-executorch-lfm2.5-1.2B-instruct) | 1.2B ||

docs/docs/06-api-reference/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
- [HAMMER2_1_1_5B_QUANTIZED](variables/HAMMER2_1_1_5B_QUANTIZED.md)
4949
- [HAMMER2_1_3B](variables/HAMMER2_1_3B.md)
5050
- [HAMMER2_1_3B_QUANTIZED](variables/HAMMER2_1_3B_QUANTIZED.md)
51+
- [LFM2_5_1_2B_INSTRUCT](variables/LFM2_5_1_2B_INSTRUCT.md)
52+
- [LFM2_5_1_2B_INSTRUCT_QUANTIZED](variables/LFM2_5_1_2B_INSTRUCT_QUANTIZED.md)
5153
- [LLAMA3_2_1B](variables/LLAMA3_2_1B.md)
5254
- [LLAMA3_2_1B_QLORA](variables/LLAMA3_2_1B_QLORA.md)
5355
- [LLAMA3_2_1B_SPINQUANT](variables/LLAMA3_2_1B_SPINQUANT.md)

docs/docs/06-api-reference/typedoc-sidebar.cjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/docs/06-api-reference/variables/ALL_MINILM_L6_V2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
> `const` **ALL_MINILM_L6_V2**: `object`
44
5-
Defined in: [constants/modelUrls.ts:562](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/constants/modelUrls.ts#L562)
5+
Defined in: [constants/modelUrls.ts:586](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/constants/modelUrls.ts#L586)
66

77
## Type Declaration
88

docs/docs/06-api-reference/variables/ALL_MPNET_BASE_V2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
> `const` **ALL_MPNET_BASE_V2**: `object`
44
5-
Defined in: [constants/modelUrls.ts:570](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/constants/modelUrls.ts#L570)
5+
Defined in: [constants/modelUrls.ts:594](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/constants/modelUrls.ts#L594)
66

77
## Type Declaration
88

docs/docs/06-api-reference/variables/BK_SDM_TINY_VPRED_256.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
> `const` **BK_SDM_TINY_VPRED_256**: `object`
44
5-
Defined in: [constants/modelUrls.ts:615](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/constants/modelUrls.ts#L615)
5+
Defined in: [constants/modelUrls.ts:639](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/constants/modelUrls.ts#L639)
66

77
## Type Declaration
88

docs/docs/06-api-reference/variables/BK_SDM_TINY_VPRED_512.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
> `const` **BK_SDM_TINY_VPRED_512**: `object`
44
5-
Defined in: [constants/modelUrls.ts:604](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/constants/modelUrls.ts#L604)
5+
Defined in: [constants/modelUrls.ts:628](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/constants/modelUrls.ts#L628)
66

77
## Type Declaration
88

docs/docs/06-api-reference/variables/CLIP_VIT_BASE_PATCH32_IMAGE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
> `const` **CLIP_VIT_BASE_PATCH32_IMAGE**: `object`
44
5-
Defined in: [constants/modelUrls.ts:543](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/constants/modelUrls.ts#L543)
5+
Defined in: [constants/modelUrls.ts:567](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/constants/modelUrls.ts#L567)
66

77
## Type Declaration
88

docs/docs/06-api-reference/variables/CLIP_VIT_BASE_PATCH32_TEXT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
> `const` **CLIP_VIT_BASE_PATCH32_TEXT**: `object`
44
5-
Defined in: [constants/modelUrls.ts:594](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/constants/modelUrls.ts#L594)
5+
Defined in: [constants/modelUrls.ts:618](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/constants/modelUrls.ts#L618)
66

77
## Type Declaration
88

docs/docs/06-api-reference/variables/DEEPLAB_V3_RESNET50.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
> `const` **DEEPLAB_V3_RESNET50**: `object`
44
5-
Defined in: [constants/modelUrls.ts:523](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/constants/modelUrls.ts#L523)
5+
Defined in: [constants/modelUrls.ts:547](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/constants/modelUrls.ts#L547)
66

77
## Type Declaration
88

0 commit comments

Comments
 (0)