Skip to content

Commit 40dff29

Browse files
authored
chore: add Qwen3.5 and Bielik v3.0 models (#1096)
## Description Adds symbols for Qwen3.5 and Bielik models. NOTE: The support for Qwen3.5 is experimental right now since due to architectural constraints (namely the GatedDeltaNet implementation) model requires sequential prefill fallback which results in very slow prefill. ### 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 <!-- Provide step-by-step instructions on how to test your changes. Include setup details if necessary. --> - [ ] Run example LLM app and test new models: - `QWEN3_5_2B_QUANTIZED` - `QWEN3_5_0_8B_QUANTIZED` - `BIELIK_V3_0_1_5B` - `BIELIK_V3_0_1_5B_QUANTIZED` - [ ] Check HF pages for the added models: - https://huggingface.co/software-mansion/react-native-executorch-qwen-3.5 - https://huggingface.co/software-mansion/react-native-executorch-bielik-v3.0 ### Screenshots <!-- Add screenshots here, if applicable --> ### Related issues <!-- Link related issues here using #issue-number --> Closes #935 Closes #1097 ### 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 6c672de commit 40dff29

4 files changed

Lines changed: 77 additions & 2 deletions

File tree

.cspell-wordlist.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,3 +183,4 @@ Synchronizable
183183
stringifying
184184
hɛloʊ
185185
wɜːld
186+
bielik

apps/llm/components/llmModels.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ import {
3636
LFM2_5_1_2B_INSTRUCT,
3737
LFM2_5_1_2B_INSTRUCT_QUANTIZED,
3838
LLMProps,
39+
QWEN3_5_0_8B_QUANTIZED,
40+
QWEN3_5_2B_QUANTIZED,
41+
BIELIK_V3_0_1_5B_QUANTIZED,
42+
BIELIK_V3_0_1_5B,
3943
} from 'react-native-executorch';
4044
import { ModelOption } from './ModelPicker';
4145

@@ -77,6 +81,9 @@ export const LLM_MODELS: ModelOption<LLMModelSources>[] = [
7781
{ label: 'Qwen2.5 1.5B Quantized', value: QWEN2_5_1_5B_QUANTIZED },
7882
{ label: 'Qwen2.5 3B', value: QWEN2_5_3B },
7983
{ label: 'Qwen2.5 3B Quantized', value: QWEN2_5_3B_QUANTIZED },
84+
// Qwen3.5
85+
{ label: 'Qwen3.5 0.8B Quantized', value: QWEN3_5_0_8B_QUANTIZED },
86+
{ label: 'Qwen3.5 2B Quantized', value: QWEN3_5_2B_QUANTIZED },
8087
// Phi-4
8188
{ label: 'Phi-4 Mini 4B', value: PHI_4_MINI_4B },
8289
{ label: 'Phi-4 Mini 4B Quantized', value: PHI_4_MINI_4B_QUANTIZED },
@@ -88,4 +95,7 @@ export const LLM_MODELS: ModelOption<LLMModelSources>[] = [
8895
label: 'LFM2.5 1.2B Instruct Quantized',
8996
value: LFM2_5_1_2B_INSTRUCT_QUANTIZED,
9097
},
98+
// Bielik v3.0
99+
{ label: 'Bielik v3.0 1.5B', value: BIELIK_V3_0_1_5B },
100+
{ label: 'Bielik v3.0 1.5B Quantized', value: BIELIK_V3_0_1_5B_QUANTIZED },
91101
];

packages/react-native-executorch/src/constants/modelUrls.ts

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Platform } from 'react-native';
2-
import { URL_PREFIX, VERSION_TAG } from './versions';
2+
import { URL_PREFIX, VERSION_TAG, NEXT_VERSION_TAG } from './versions';
33

44
// LLMs
55

@@ -353,6 +353,36 @@ export const QWEN2_5_3B_QUANTIZED = {
353353
tokenizerConfigSource: QWEN2_5_TOKENIZER_CONFIG,
354354
} as const;
355355

356+
// QWEN3.5-0.8B
357+
const QWEN3_5_0_8B_QUANTIZED_MODEL = `${URL_PREFIX}-qwen-3.5/${NEXT_VERSION_TAG}/Qwen3.5-0.8B/qwen3_5_0_8b_xnnpack_8da4w.pte`;
358+
const QWEN3_5_0_8B_TOKENIZER = `${URL_PREFIX}-qwen-3.5/${NEXT_VERSION_TAG}/Qwen3.5-0.8B/tokenizer.json`;
359+
const QWEN3_5_0_8B_TOKENIZER_CONFIG = `${URL_PREFIX}-qwen-3.5/${NEXT_VERSION_TAG}/Qwen3.5-0.8B/tokenizer_config.json`;
360+
361+
/**
362+
* @category Models - LLM
363+
*/
364+
export const QWEN3_5_0_8B_QUANTIZED = {
365+
modelName: 'qwen3.5-0.8b-quantized',
366+
modelSource: QWEN3_5_0_8B_QUANTIZED_MODEL,
367+
tokenizerSource: QWEN3_5_0_8B_TOKENIZER,
368+
tokenizerConfigSource: QWEN3_5_0_8B_TOKENIZER_CONFIG,
369+
} as const;
370+
371+
// QWEN3.5-2B
372+
const QWEN3_5_2B_QUANTIZED_MODEL = `${URL_PREFIX}-qwen-3.5/${NEXT_VERSION_TAG}/Qwen3.5-2B/qwen3_5_2b_xnnpack_8da4w.pte`;
373+
const QWEN3_5_2B_TOKENIZER = `${URL_PREFIX}-qwen-3.5/${NEXT_VERSION_TAG}/Qwen3.5-2B/tokenizer.json`;
374+
const QWEN3_5_2B_TOKENIZER_CONFIG = `${URL_PREFIX}-qwen-3.5/${NEXT_VERSION_TAG}/Qwen3.5-2B/tokenizer_config.json`;
375+
376+
/**
377+
* @category Models - LLM
378+
*/
379+
export const QWEN3_5_2B_QUANTIZED = {
380+
modelName: 'qwen3.5-2b-quantized',
381+
modelSource: QWEN3_5_2B_QUANTIZED_MODEL,
382+
tokenizerSource: QWEN3_5_2B_TOKENIZER,
383+
tokenizerConfigSource: QWEN3_5_2B_TOKENIZER_CONFIG,
384+
} as const;
385+
356386
// PHI 4
357387
const PHI_4_MINI_4B_MODEL = `${URL_PREFIX}-phi-4-mini/${VERSION_TAG}/original/phi-4-mini_bf16.pte`;
358388
const PHI_4_MINI_4B_QUANTIZED_MODEL = `${URL_PREFIX}-phi-4-mini/${VERSION_TAG}/quantized/phi-4-mini_8da4w.pte`;
@@ -431,6 +461,32 @@ export const LFM2_5_350M_QUANTIZED = {
431461
tokenizerConfigSource: LFM2_5_350M_TOKENIZER_CONFIG,
432462
} as const;
433463

464+
// Bielik-v3.0
465+
const BIELIK_V3_0_1_5B_MODEL = `${URL_PREFIX}-bielik-v3.0/${VERSION_TAG}/bielik-v3.0-1.5B/original/bielik_1_5b_v3_0_instruct_xnnpack_fp16.pte`;
466+
const BIELIK_V3_0_1_5B_QUANTIZED_MODEL = `${URL_PREFIX}-bielik-v3.0/${VERSION_TAG}/bielik-v3.0-1.5B/quantized/bielik_1_5b_v3_0_instruct_xnnpack_8da4w.pte`;
467+
const BIELIK_V3_0_TOKENIZER = `${URL_PREFIX}-bielik-v3.0/${VERSION_TAG}/tokenizer.json`;
468+
const BIELIK_V3_0_TOKENIZER_CONFIG = `${URL_PREFIX}-bielik-v3.0/${VERSION_TAG}/tokenizer_config.json`;
469+
470+
/**
471+
* @category Models - LLM
472+
*/
473+
export const BIELIK_V3_0_1_5B = {
474+
modelName: 'bielik-v3.0-1.5b',
475+
modelSource: BIELIK_V3_0_1_5B_MODEL,
476+
tokenizerSource: BIELIK_V3_0_TOKENIZER,
477+
tokenizerConfigSource: BIELIK_V3_0_TOKENIZER_CONFIG,
478+
} as const;
479+
480+
/**
481+
* @category Models - LLM
482+
*/
483+
export const BIELIK_V3_0_1_5B_QUANTIZED = {
484+
modelName: 'bielik-v3.0-1.5b-quantized',
485+
modelSource: BIELIK_V3_0_1_5B_QUANTIZED_MODEL,
486+
tokenizerSource: BIELIK_V3_0_TOKENIZER,
487+
tokenizerConfigSource: BIELIK_V3_0_TOKENIZER_CONFIG,
488+
} as const;
489+
434490
// LFM2.5-VL-1.6B
435491
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`;
436492
const LFM2_VL_1_6B_TOKENIZER = `${URL_PREFIX}-lfm-2.5/${VERSION_TAG}/lfm2.5-VL-1.6B/tokenizer.json`;
@@ -1103,6 +1159,8 @@ export const MODEL_REGISTRY = {
11031159
QWEN3_1_7B_QUANTIZED,
11041160
QWEN3_4B,
11051161
QWEN3_4B_QUANTIZED,
1162+
QWEN3_5_0_8B_QUANTIZED,
1163+
QWEN3_5_2B_QUANTIZED,
11061164
HAMMER2_1_0_5B,
11071165
HAMMER2_1_0_5B_QUANTIZED,
11081166
HAMMER2_1_1_5B,
@@ -1129,6 +1187,8 @@ export const MODEL_REGISTRY = {
11291187
LFM2_5_1_2B_INSTRUCT_QUANTIZED,
11301188
LFM2_VL_1_6B_QUANTIZED,
11311189
LFM2_VL_450M_QUANTIZED,
1190+
BIELIK_V3_0_1_5B,
1191+
BIELIK_V3_0_1_5B_QUANTIZED,
11321192
EFFICIENTNET_V2_S,
11331193
EFFICIENTNET_V2_S_QUANTIZED,
11341194
SSDLITE_320_MOBILENET_V3_LARGE,

packages/react-native-executorch/src/types/llm.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ export type LLMModelName =
5656
| 'lfm2.5-1.2b-instruct'
5757
| 'lfm2.5-1.2b-instruct-quantized'
5858
| 'lfm2.5-vl-1.6b-quantized'
59-
| 'lfm2.5-vl-450m-quantized';
59+
| 'lfm2.5-vl-450m-quantized'
60+
| 'qwen3.5-0.8b-quantized'
61+
| 'qwen3.5-2b-quantized'
62+
| 'bielik-v3.0-1.5b'
63+
| 'bielik-v3.0-1.5b-quantized';
6064

6165
/**
6266
* Properties for initializing and configuring a Large Language Model (LLM) instance.

0 commit comments

Comments
 (0)