Skip to content

Commit b75f178

Browse files
committed
Add quantized .en models & fix test URLs
1 parent 43cf499 commit b75f178

File tree

2 files changed

+43
-5
lines changed

2 files changed

+43
-5
lines changed

packages/react-native-executorch/common/rnexecutorch/tests/run_tests.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,8 @@ MODELS=(
5454
"all-MiniLM-L6-v2_xnnpack.pte|https://huggingface.co/software-mansion/react-native-executorch-all-MiniLM-L6-v2/resolve/v0.6.0/all-MiniLM-L6-v2_xnnpack.pte"
5555
"tokenizer.json|https://huggingface.co/software-mansion/react-native-executorch-all-MiniLM-L6-v2/resolve/v0.6.0/tokenizer.json"
5656
"fsmn-vad_xnnpack.pte|https://huggingface.co/software-mansion/react-native-executorch-fsmn-vad/resolve/main/xnnpack/fsmn-vad_xnnpack.pte"
57-
"whisper_tiny_en_encoder_xnnpack.pte|https://huggingface.co/software-mansion/react-native-executorch-whisper-tiny.en/resolve/v0.7.0/xnnpack/whisper_tiny_en_encoder_xnnpack.pte"
58-
"whisper_tiny_en_decoder_xnnpack.pte|https://huggingface.co/software-mansion/react-native-executorch-whisper-tiny.en/resolve/v0.7.0/xnnpack/whisper_tiny_en_decoder_xnnpack.pte"
59-
"whisper_tokenizer.json|https://huggingface.co/software-mansion/react-native-executorch-whisper-tiny.en/resolve/v0.6.0/tokenizer.json"
57+
"whisper_tiny_en_xnnpack.pte|https://huggingface.co/software-mansion/react-native-executorch-whisper-tiny.en/resolve/v0.8.0/xnnpack/whisper_tiny_en_xnnpack.pte"
58+
"whisper_tokenizer.json|https://huggingface.co/software-mansion/react-native-executorch-whisper-tiny.en/resolve/v0.8.0/tokenizer.json"
6059
"smolLm2_135M_8da4w.pte|https://huggingface.co/software-mansion/react-native-executorch-smolLm-2/resolve/v0.6.0/smolLm-2-135M/quantized/smolLm2_135M_8da4w.pte"
6160
"smollm_tokenizer.json|https://huggingface.co/software-mansion/react-native-executorch-smolLm-2/resolve/v0.6.0/tokenizer.json"
6261
"deeplabV3_xnnpack_fp32.pte|https://huggingface.co/software-mansion/react-native-executorch-deeplab-v3/resolve/v0.6.0/xnnpack/deeplabV3_xnnpack_fp32.pte"

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

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,12 +454,21 @@ export const STYLE_TRANSFER_UDNIE = {
454454
const WHISPER_TINY_EN_TOKENIZER = `${URL_PREFIX}-whisper-tiny.en/${VERSION_TAG}/tokenizer.json`;
455455
const WHISPER_TINY_EN_MODEL = `${URL_PREFIX}-whisper-tiny.en/${NEXT_VERSION_TAG}/xnnpack/whisper_tiny_en_xnnpack.pte`;
456456

457-
const WHISPER_BASE_EN_TOKENIZER = `${URL_PREFIX}-whisper-base.en/${VERSION_TAG}/tokenizer.json`;
457+
const WHISPER_TINY_EN_QUANTIZED_TOKENIZER = `${URL_PREFIX}-whisper-tiny-quantized.en/${NEXT_VERSION_TAG}/tokenizer.json`;
458+
const WHISPER_TINY_EN_QUANTIZED_MODEL = `${URL_PREFIX}-whisper-tiny-quantized.en/${NEXT_VERSION_TAG}/xnnpack/whisper_tiny_en_quantized_xnnpack.pte`;
459+
460+
const WHISPER_BASE_EN_TOKENIZER = `${URL_PREFIX}-whisper-base.en/${NEXT_VERSION_TAG}/tokenizer.json`;
458461
const WHISPER_BASE_EN_MODEL = `${URL_PREFIX}-whisper-base.en/${NEXT_VERSION_TAG}/xnnpack/whisper_base_en_xnnpack.pte`;
459462

460-
const WHISPER_SMALL_EN_TOKENIZER = `${URL_PREFIX}-whisper-small.en/${VERSION_TAG}/tokenizer.json`;
463+
const WHISPER_BASE_EN_QUANTIZED_TOKENIZER = `${URL_PREFIX}-whisper-base-quantized.en/${VERSION_TAG}/tokenizer.json`;
464+
const WHISPER_BASE_EN_QUANTIZED_MODEL = `${URL_PREFIX}-whisper-base-quantized.en/${NEXT_VERSION_TAG}/xnnpack/whisper_base_en_quantized_xnnpack.pte`;
465+
466+
const WHISPER_SMALL_EN_TOKENIZER = `${URL_PREFIX}-whisper-small.en/${NEXT_VERSION_TAG}/tokenizer.json`;
461467
const WHISPER_SMALL_EN_MODEL = `${URL_PREFIX}-whisper-small.en/${NEXT_VERSION_TAG}/xnnpack/whisper_small_en_xnnpack.pte`;
462468

469+
const WHISPER_SMALL_EN_QUANTIZED_TOKENIZER = `${URL_PREFIX}-whisper-small-quantized.en/${VERSION_TAG}/tokenizer.json`;
470+
const WHISPER_SMALL_EN_QUANTIZED_MODEL = `${URL_PREFIX}-whisper-small-quantized.en/${NEXT_VERSION_TAG}/xnnpack/whisper_small_en_quantized_xnnpack.pte`;
471+
463472
const WHISPER_TINY_TOKENIZER = `${URL_PREFIX}-whisper-tiny/${VERSION_TAG}/tokenizer.json`;
464473
const WHISPER_TINY_MODEL = `${URL_PREFIX}-whisper-tiny/${NEXT_VERSION_TAG}/xnnpack/whisper_tiny_xnnpack.pte`;
465474

@@ -479,6 +488,16 @@ export const WHISPER_TINY_EN = {
479488
tokenizerSource: WHISPER_TINY_EN_TOKENIZER,
480489
};
481490

491+
/**
492+
* @category Models - Speech To Text
493+
*/
494+
export const WHISPER_TINY_EN_QUANTIZED = {
495+
type: 'whisper' as const,
496+
isMultilingual: false,
497+
modelSource: WHISPER_TINY_EN_QUANTIZED_MODEL,
498+
tokenizerSource: WHISPER_TINY_EN_QUANTIZED_TOKENIZER,
499+
};
500+
482501
/**
483502
* @category Models - Speech To Text
484503
*/
@@ -489,6 +508,16 @@ export const WHISPER_BASE_EN = {
489508
tokenizerSource: WHISPER_BASE_EN_TOKENIZER,
490509
};
491510

511+
/**
512+
* @category Models - Speech To Text
513+
*/
514+
export const WHISPER_BASE_EN_QUANTIZED = {
515+
type: 'whisper' as const,
516+
isMultilingual: false,
517+
modelSource: WHISPER_BASE_EN_QUANTIZED_MODEL,
518+
tokenizerSource: WHISPER_BASE_EN_QUANTIZED_TOKENIZER,
519+
};
520+
492521
/**
493522
* @category Models - Speech To Text
494523
*/
@@ -499,6 +528,16 @@ export const WHISPER_SMALL_EN = {
499528
tokenizerSource: WHISPER_SMALL_EN_TOKENIZER,
500529
};
501530

531+
/**
532+
* @category Models - Speech To Text
533+
*/
534+
export const WHISPER_SMALL_EN_QUANTIZED = {
535+
type: 'whisper' as const,
536+
isMultilingual: false,
537+
modelSource: WHISPER_SMALL_EN_QUANTIZED_MODEL,
538+
tokenizerSource: WHISPER_SMALL_EN_QUANTIZED_TOKENIZER,
539+
};
540+
502541
/**
503542
* @category Models - Speech To Text
504543
*/

0 commit comments

Comments
 (0)