react-native-executorch 0.3.3 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -13
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/swmansion/rnexecutorch/ETModule.kt +1 -2
- package/android/src/main/java/com/swmansion/rnexecutorch/ImageSegmentation.kt +58 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/LLM.kt +13 -49
- package/android/src/main/java/com/swmansion/rnexecutorch/RnExecutorchPackage.kt +37 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/StyleTransfer.kt +1 -1
- package/android/src/main/java/com/swmansion/rnexecutorch/TextEmbeddings.kt +51 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/Tokenizer.kt +86 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/models/BaseModel.kt +3 -4
- package/android/src/main/java/com/swmansion/rnexecutorch/models/TextEmbeddings/TextEmbeddingsModel.kt +48 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/models/TextEmbeddings/TextEmbeddingsUtils.kt +37 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/models/classification/ClassificationModel.kt +1 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/models/imageSegmentation/Constants.kt +26 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/models/imageSegmentation/ImageSegmentationModel.kt +142 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/models/ocr/utils/RecognizerUtils.kt +3 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/models/{StyleTransferModel.kt → styleTransfer/StyleTransferModel.kt} +2 -1
- package/android/src/main/java/com/swmansion/rnexecutorch/utils/ArrayUtils.kt +0 -8
- package/android/src/main/java/com/swmansion/rnexecutorch/{models/classification/Utils.kt → utils/Numerical.kt} +1 -1
- package/ios/ExecutorchLib.xcframework/Info.plist +4 -4
- package/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/ExecutorchLib +0 -0
- package/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/Headers/HuggingFaceTokenizer.h +14 -0
- package/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/Headers/LLaMARunner.h +1 -23
- package/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/Info.plist +0 -0
- package/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/ExecutorchLib +0 -0
- package/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/Headers/HuggingFaceTokenizer.h +14 -0
- package/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/Headers/LLaMARunner.h +1 -23
- package/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/Info.plist +0 -0
- package/ios/RnExecutorch/Classification.mm +15 -18
- package/ios/RnExecutorch/ETModule.mm +6 -5
- package/ios/RnExecutorch/ImageSegmentation.h +5 -0
- package/ios/RnExecutorch/ImageSegmentation.mm +60 -0
- package/ios/RnExecutorch/LLM.mm +12 -53
- package/ios/RnExecutorch/OCR.mm +39 -43
- package/ios/RnExecutorch/ObjectDetection.mm +20 -20
- package/ios/RnExecutorch/SpeechToText.mm +6 -7
- package/ios/RnExecutorch/StyleTransfer.mm +16 -19
- package/ios/RnExecutorch/TextEmbeddings.h +5 -0
- package/ios/RnExecutorch/TextEmbeddings.mm +62 -0
- package/ios/RnExecutorch/Tokenizer.h +5 -0
- package/ios/RnExecutorch/Tokenizer.mm +83 -0
- package/ios/RnExecutorch/VerticalOCR.mm +36 -36
- package/ios/RnExecutorch/models/BaseModel.h +2 -5
- package/ios/RnExecutorch/models/BaseModel.mm +5 -15
- package/ios/RnExecutorch/models/classification/ClassificationModel.mm +2 -3
- package/ios/RnExecutorch/models/classification/Constants.mm +0 -1
- package/ios/RnExecutorch/models/image_segmentation/Constants.h +4 -0
- package/ios/RnExecutorch/models/image_segmentation/Constants.mm +8 -0
- package/ios/RnExecutorch/models/image_segmentation/ImageSegmentationModel.h +10 -0
- package/ios/RnExecutorch/models/image_segmentation/ImageSegmentationModel.mm +146 -0
- package/ios/RnExecutorch/models/object_detection/SSDLiteLargeModel.mm +1 -2
- package/ios/RnExecutorch/models/ocr/Detector.h +0 -2
- package/ios/RnExecutorch/models/ocr/Detector.mm +2 -1
- package/ios/RnExecutorch/models/ocr/RecognitionHandler.h +5 -4
- package/ios/RnExecutorch/models/ocr/RecognitionHandler.mm +9 -26
- package/ios/RnExecutorch/models/ocr/Recognizer.mm +1 -2
- package/ios/RnExecutorch/models/ocr/VerticalDetector.h +0 -2
- package/ios/RnExecutorch/models/ocr/VerticalDetector.mm +2 -1
- package/ios/RnExecutorch/models/ocr/utils/OCRUtils.mm +0 -1
- package/ios/RnExecutorch/models/stt/Moonshine.mm +1 -6
- package/ios/RnExecutorch/models/stt/SpeechToTextBaseModel.mm +7 -11
- package/ios/RnExecutorch/models/stt/Whisper.mm +0 -5
- package/ios/RnExecutorch/models/{StyleTransferModel.h → style_transfer/StyleTransferModel.h} +1 -1
- package/ios/RnExecutorch/models/{StyleTransferModel.mm → style_transfer/StyleTransferModel.mm} +2 -3
- package/ios/RnExecutorch/models/text_embeddings/TextEmbeddingsModel.h +15 -0
- package/ios/RnExecutorch/models/text_embeddings/TextEmbeddingsModel.mm +45 -0
- package/ios/RnExecutorch/models/text_embeddings/TextEmbeddingsUtils.h +8 -0
- package/ios/RnExecutorch/models/text_embeddings/TextEmbeddingsUtils.mm +49 -0
- package/ios/RnExecutorch/utils/Conversions.h +15 -0
- package/ios/RnExecutorch/utils/ImageProcessor.h +0 -1
- package/ios/RnExecutorch/{models/classification/Utils.h → utils/Numerical.h} +0 -2
- package/ios/RnExecutorch/{models/classification/Utils.mm → utils/Numerical.mm} +0 -2
- package/ios/RnExecutorch/utils/ObjectDetectionUtils.mm +0 -2
- package/ios/RnExecutorch/utils/SFFT.mm +1 -1
- package/ios/RnExecutorch/utils/ScalarType.h +0 -2
- package/lib/module/Error.js +16 -2
- package/lib/module/Error.js.map +1 -1
- package/lib/module/constants/{llamaDefaults.js → llmDefaults.js} +7 -3
- package/lib/module/constants/llmDefaults.js.map +1 -0
- package/lib/module/constants/modelUrls.js +88 -27
- package/lib/module/constants/modelUrls.js.map +1 -1
- package/lib/module/constants/ocr/models.js +290 -0
- package/lib/module/constants/ocr/models.js.map +1 -0
- package/lib/module/constants/ocr/symbols.js +137 -2
- package/lib/module/constants/ocr/symbols.js.map +1 -1
- package/lib/module/constants/sttDefaults.js +50 -25
- package/lib/module/constants/sttDefaults.js.map +1 -1
- package/lib/module/controllers/LLMController.js +205 -0
- package/lib/module/controllers/LLMController.js.map +1 -0
- package/lib/module/controllers/OCRController.js +5 -10
- package/lib/module/controllers/OCRController.js.map +1 -1
- package/lib/module/controllers/SpeechToTextController.js +225 -122
- package/lib/module/controllers/SpeechToTextController.js.map +1 -1
- package/lib/module/controllers/VerticalOCRController.js +6 -10
- package/lib/module/controllers/VerticalOCRController.js.map +1 -1
- package/lib/module/hooks/computer_vision/useClassification.js +8 -23
- package/lib/module/hooks/computer_vision/useClassification.js.map +1 -1
- package/lib/module/hooks/computer_vision/useImageSegmentation.js +13 -0
- package/lib/module/hooks/computer_vision/useImageSegmentation.js.map +1 -0
- package/lib/module/hooks/computer_vision/useOCR.js +11 -6
- package/lib/module/hooks/computer_vision/useOCR.js.map +1 -1
- package/lib/module/hooks/computer_vision/useObjectDetection.js +8 -23
- package/lib/module/hooks/computer_vision/useObjectDetection.js.map +1 -1
- package/lib/module/hooks/computer_vision/useStyleTransfer.js +8 -23
- package/lib/module/hooks/computer_vision/useStyleTransfer.js.map +1 -1
- package/lib/module/hooks/computer_vision/useVerticalOCR.js +10 -7
- package/lib/module/hooks/computer_vision/useVerticalOCR.js.map +1 -1
- package/lib/module/hooks/general/useExecutorchModule.js +8 -36
- package/lib/module/hooks/general/useExecutorchModule.js.map +1 -1
- package/lib/module/hooks/natural_language_processing/useLLM.js +54 -63
- package/lib/module/hooks/natural_language_processing/useLLM.js.map +1 -1
- package/lib/module/hooks/natural_language_processing/useSpeechToText.js +15 -11
- package/lib/module/hooks/natural_language_processing/useSpeechToText.js.map +1 -1
- package/lib/module/hooks/natural_language_processing/useTextEmbeddings.js +14 -0
- package/lib/module/hooks/natural_language_processing/useTextEmbeddings.js.map +1 -0
- package/lib/module/hooks/natural_language_processing/useTokenizer.js +54 -0
- package/lib/module/hooks/natural_language_processing/useTokenizer.js.map +1 -0
- package/lib/module/hooks/useModule.js +18 -62
- package/lib/module/hooks/useModule.js.map +1 -1
- package/lib/module/index.js +16 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/modules/BaseModule.js +9 -10
- package/lib/module/modules/BaseModule.js.map +1 -1
- package/lib/module/modules/computer_vision/ClassificationModule.js +8 -5
- package/lib/module/modules/computer_vision/ClassificationModule.js.map +1 -1
- package/lib/module/modules/computer_vision/ImageSegmentationModule.js +28 -0
- package/lib/module/modules/computer_vision/ImageSegmentationModule.js.map +1 -0
- package/lib/module/modules/computer_vision/ObjectDetectionModule.js +8 -5
- package/lib/module/modules/computer_vision/ObjectDetectionModule.js.map +1 -1
- package/lib/module/modules/computer_vision/StyleTransferModule.js +8 -5
- package/lib/module/modules/computer_vision/StyleTransferModule.js.map +1 -1
- package/lib/module/modules/general/ExecutorchModule.js +8 -5
- package/lib/module/modules/general/ExecutorchModule.js.map +1 -1
- package/lib/module/modules/natural_language_processing/LLMModule.js +46 -27
- package/lib/module/modules/natural_language_processing/LLMModule.js.map +1 -1
- package/lib/module/modules/natural_language_processing/SpeechToTextModule.js +8 -5
- package/lib/module/modules/natural_language_processing/SpeechToTextModule.js.map +1 -1
- package/lib/module/modules/natural_language_processing/TextEmbeddingsModule.js +14 -0
- package/lib/module/modules/natural_language_processing/TextEmbeddingsModule.js.map +1 -0
- package/lib/module/modules/natural_language_processing/TokenizerModule.js +26 -0
- package/lib/module/modules/natural_language_processing/TokenizerModule.js.map +1 -0
- package/lib/module/native/NativeClassification.js.map +1 -1
- package/lib/module/native/NativeImageSegmentation.js +5 -0
- package/lib/module/native/NativeImageSegmentation.js.map +1 -0
- package/lib/module/native/NativeLLM.js.map +1 -1
- package/lib/module/native/NativeTextEmbeddings.js +5 -0
- package/lib/module/native/NativeTextEmbeddings.js.map +1 -0
- package/lib/module/native/NativeTokenizer.js +5 -0
- package/lib/module/native/NativeTokenizer.js.map +1 -0
- package/lib/module/native/RnExecutorchModules.js +18 -113
- package/lib/module/native/RnExecutorchModules.js.map +1 -1
- package/lib/module/types/common.js.map +1 -1
- package/lib/module/types/imageSegmentation.js +29 -0
- package/lib/module/types/imageSegmentation.js.map +1 -0
- package/lib/module/types/llm.js +7 -0
- package/lib/module/types/llm.js.map +1 -0
- package/lib/module/types/{object_detection.js → objectDetection.js} +1 -1
- package/lib/module/types/objectDetection.js.map +1 -0
- package/lib/module/types/ocr.js +2 -0
- package/lib/module/types/stt.js +82 -0
- package/lib/module/types/stt.js.map +1 -0
- package/lib/module/utils/ResourceFetcher.js +156 -0
- package/lib/module/utils/ResourceFetcher.js.map +1 -0
- package/lib/module/utils/llm.js +25 -0
- package/lib/module/utils/llm.js.map +1 -0
- package/lib/module/utils/stt.js +22 -0
- package/lib/module/utils/stt.js.map +1 -0
- package/lib/typescript/Error.d.ts +4 -1
- package/lib/typescript/Error.d.ts.map +1 -1
- package/lib/typescript/constants/{llamaDefaults.d.ts → llmDefaults.d.ts} +5 -5
- package/lib/typescript/constants/llmDefaults.d.ts.map +1 -0
- package/lib/typescript/constants/modelUrls.d.ts +74 -28
- package/lib/typescript/constants/modelUrls.d.ts.map +1 -1
- package/lib/typescript/constants/ocr/models.d.ts +285 -0
- package/lib/typescript/constants/ocr/models.d.ts.map +1 -0
- package/lib/typescript/constants/ocr/symbols.d.ts +73 -1
- package/lib/typescript/constants/ocr/symbols.d.ts.map +1 -1
- package/lib/typescript/constants/sttDefaults.d.ts +8 -13
- package/lib/typescript/constants/sttDefaults.d.ts.map +1 -1
- package/lib/typescript/controllers/LLMController.d.ts +46 -0
- package/lib/typescript/controllers/LLMController.d.ts.map +1 -0
- package/lib/typescript/controllers/OCRController.d.ts.map +1 -1
- package/lib/typescript/controllers/SpeechToTextController.d.ts +30 -16
- package/lib/typescript/controllers/SpeechToTextController.d.ts.map +1 -1
- package/lib/typescript/controllers/VerticalOCRController.d.ts +1 -1
- package/lib/typescript/controllers/VerticalOCRController.d.ts.map +1 -1
- package/lib/typescript/hooks/computer_vision/useClassification.d.ts +5 -5
- package/lib/typescript/hooks/computer_vision/useClassification.d.ts.map +1 -1
- package/lib/typescript/hooks/computer_vision/useImageSegmentation.d.ts +37 -0
- package/lib/typescript/hooks/computer_vision/useImageSegmentation.d.ts.map +1 -0
- package/lib/typescript/hooks/computer_vision/useOCR.d.ts +2 -1
- package/lib/typescript/hooks/computer_vision/useOCR.d.ts.map +1 -1
- package/lib/typescript/hooks/computer_vision/useObjectDetection.d.ts +5 -4
- package/lib/typescript/hooks/computer_vision/useObjectDetection.d.ts.map +1 -1
- package/lib/typescript/hooks/computer_vision/useStyleTransfer.d.ts +4 -2
- package/lib/typescript/hooks/computer_vision/useStyleTransfer.d.ts.map +1 -1
- package/lib/typescript/hooks/computer_vision/useVerticalOCR.d.ts +2 -1
- package/lib/typescript/hooks/computer_vision/useVerticalOCR.d.ts.map +1 -1
- package/lib/typescript/hooks/general/useExecutorchModule.d.ts +5 -6
- package/lib/typescript/hooks/general/useExecutorchModule.d.ts.map +1 -1
- package/lib/typescript/hooks/natural_language_processing/useLLM.d.ts +6 -6
- package/lib/typescript/hooks/natural_language_processing/useLLM.d.ts.map +1 -1
- package/lib/typescript/hooks/natural_language_processing/useSpeechToText.d.ts +7 -3
- package/lib/typescript/hooks/natural_language_processing/useSpeechToText.d.ts.map +1 -1
- package/lib/typescript/hooks/natural_language_processing/useTextEmbeddings.d.ts +13 -0
- package/lib/typescript/hooks/natural_language_processing/useTextEmbeddings.d.ts.map +1 -0
- package/lib/typescript/hooks/natural_language_processing/useTokenizer.d.ts +16 -0
- package/lib/typescript/hooks/natural_language_processing/useTokenizer.d.ts.map +1 -0
- package/lib/typescript/hooks/useModule.d.ts +11 -10
- package/lib/typescript/hooks/useModule.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +15 -2
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/modules/BaseModule.d.ts +4 -5
- package/lib/typescript/modules/BaseModule.d.ts.map +1 -1
- package/lib/typescript/modules/computer_vision/ClassificationModule.d.ts +7 -7
- package/lib/typescript/modules/computer_vision/ClassificationModule.d.ts.map +1 -1
- package/lib/typescript/modules/computer_vision/ImageSegmentationModule.d.ts +32 -0
- package/lib/typescript/modules/computer_vision/ImageSegmentationModule.d.ts.map +1 -0
- package/lib/typescript/modules/computer_vision/ObjectDetectionModule.d.ts +6 -5
- package/lib/typescript/modules/computer_vision/ObjectDetectionModule.d.ts.map +1 -1
- package/lib/typescript/modules/computer_vision/StyleTransferModule.d.ts +6 -5
- package/lib/typescript/modules/computer_vision/StyleTransferModule.d.ts.map +1 -1
- package/lib/typescript/modules/general/ExecutorchModule.d.ts +4 -3
- package/lib/typescript/modules/general/ExecutorchModule.d.ts.map +1 -1
- package/lib/typescript/modules/natural_language_processing/LLMModule.d.ts +19 -5
- package/lib/typescript/modules/natural_language_processing/LLMModule.d.ts.map +1 -1
- package/lib/typescript/modules/natural_language_processing/SpeechToTextModule.d.ts +7 -4
- package/lib/typescript/modules/natural_language_processing/SpeechToTextModule.d.ts.map +1 -1
- package/lib/typescript/modules/natural_language_processing/TextEmbeddingsModule.d.ts +8 -0
- package/lib/typescript/modules/natural_language_processing/TextEmbeddingsModule.d.ts.map +1 -0
- package/lib/typescript/modules/natural_language_processing/TokenizerModule.d.ts +12 -0
- package/lib/typescript/modules/natural_language_processing/TokenizerModule.d.ts.map +1 -0
- package/lib/typescript/native/NativeClassification.d.ts.map +1 -1
- package/lib/typescript/native/NativeImageSegmentation.d.ts +10 -0
- package/lib/typescript/native/NativeImageSegmentation.d.ts.map +1 -0
- package/lib/typescript/native/NativeLLM.d.ts +3 -4
- package/lib/typescript/native/NativeLLM.d.ts.map +1 -1
- package/lib/typescript/native/NativeObjectDetection.d.ts +1 -1
- package/lib/typescript/native/NativeObjectDetection.d.ts.map +1 -1
- package/lib/typescript/native/NativeSpeechToText.d.ts +2 -2
- package/lib/typescript/native/NativeSpeechToText.d.ts.map +1 -1
- package/lib/typescript/native/NativeTextEmbeddings.d.ts +8 -0
- package/lib/typescript/native/NativeTextEmbeddings.d.ts.map +1 -0
- package/lib/typescript/native/NativeTokenizer.d.ts +12 -0
- package/lib/typescript/native/NativeTokenizer.d.ts.map +1 -0
- package/lib/typescript/native/RnExecutorchModules.d.ts +18 -41
- package/lib/typescript/native/RnExecutorchModules.d.ts.map +1 -1
- package/lib/typescript/types/common.d.ts +1 -26
- package/lib/typescript/types/common.d.ts.map +1 -1
- package/lib/typescript/types/imageSegmentation.d.ts +25 -0
- package/lib/typescript/types/imageSegmentation.d.ts.map +1 -0
- package/lib/typescript/types/llm.d.ts +38 -0
- package/lib/typescript/types/llm.d.ts.map +1 -0
- package/lib/typescript/types/{object_detection.d.ts → objectDetection.d.ts} +1 -1
- package/lib/typescript/types/objectDetection.d.ts.map +1 -0
- package/lib/typescript/types/ocr.d.ts +2 -1
- package/lib/typescript/types/ocr.d.ts.map +1 -1
- package/lib/typescript/types/stt.d.ts +91 -0
- package/lib/typescript/types/stt.d.ts.map +1 -0
- package/lib/typescript/utils/ResourceFetcher.d.ts +17 -0
- package/lib/typescript/utils/ResourceFetcher.d.ts.map +1 -0
- package/lib/typescript/utils/llm.d.ts +3 -0
- package/lib/typescript/utils/llm.d.ts.map +1 -0
- package/lib/typescript/utils/stt.d.ts +2 -0
- package/lib/typescript/utils/stt.d.ts.map +1 -0
- package/package.json +13 -49
- package/react-native-executorch.podspec +1 -1
- package/src/Error.ts +16 -3
- package/src/constants/llmDefaults.ts +14 -0
- package/src/constants/modelUrls.ts +146 -39
- package/src/constants/ocr/models.ts +453 -0
- package/src/constants/ocr/symbols.ts +147 -3
- package/src/constants/sttDefaults.ts +55 -37
- package/src/controllers/LLMController.ts +286 -0
- package/src/controllers/OCRController.ts +14 -28
- package/src/controllers/SpeechToTextController.ts +318 -180
- package/src/controllers/VerticalOCRController.ts +17 -32
- package/src/hooks/computer_vision/useClassification.ts +11 -26
- package/src/hooks/computer_vision/useImageSegmentation.ts +18 -0
- package/src/hooks/computer_vision/useOCR.ts +17 -5
- package/src/hooks/computer_vision/useObjectDetection.ts +10 -24
- package/src/hooks/computer_vision/useStyleTransfer.ts +9 -25
- package/src/hooks/computer_vision/useVerticalOCR.ts +11 -4
- package/src/hooks/general/useExecutorchModule.ts +10 -50
- package/src/hooks/natural_language_processing/useLLM.ts +80 -97
- package/src/hooks/natural_language_processing/useSpeechToText.ts +39 -12
- package/src/hooks/natural_language_processing/useTextEmbeddings.ts +18 -0
- package/src/hooks/natural_language_processing/useTokenizer.ts +61 -0
- package/src/hooks/useModule.ts +32 -92
- package/src/index.tsx +16 -2
- package/src/modules/BaseModule.ts +16 -26
- package/src/modules/computer_vision/ClassificationModule.ts +13 -8
- package/src/modules/computer_vision/ImageSegmentationModule.ts +39 -0
- package/src/modules/computer_vision/ObjectDetectionModule.ts +13 -8
- package/src/modules/computer_vision/StyleTransferModule.ts +13 -8
- package/src/modules/general/ExecutorchModule.ts +11 -6
- package/src/modules/natural_language_processing/LLMModule.ts +64 -51
- package/src/modules/natural_language_processing/SpeechToTextModule.ts +25 -10
- package/src/modules/natural_language_processing/TextEmbeddingsModule.ts +18 -0
- package/src/modules/natural_language_processing/TokenizerModule.ts +34 -0
- package/src/native/NativeClassification.ts +0 -1
- package/src/native/NativeImageSegmentation.ts +14 -0
- package/src/native/NativeLLM.ts +3 -10
- package/src/native/NativeObjectDetection.ts +1 -1
- package/src/native/NativeSpeechToText.ts +2 -2
- package/src/native/NativeTextEmbeddings.ts +9 -0
- package/src/native/NativeTokenizer.ts +13 -0
- package/src/native/RnExecutorchModules.ts +54 -234
- package/src/types/common.ts +1 -44
- package/src/types/imageSegmentation.ts +25 -0
- package/src/types/llm.ts +57 -0
- package/src/types/ocr.ts +3 -1
- package/src/types/stt.ts +93 -0
- package/src/utils/ResourceFetcher.ts +196 -0
- package/src/utils/llm.ts +34 -0
- package/src/utils/stt.ts +28 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/utils/llms/ConversationManager.kt +0 -68
- package/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/_CodeSignature/CodeResources +0 -124
- package/ios/RnExecutorch/utils/llms/Constants.h +0 -6
- package/ios/RnExecutorch/utils/llms/Constants.mm +0 -23
- package/ios/RnExecutorch/utils/llms/ConversationManager.h +0 -26
- package/ios/RnExecutorch/utils/llms/ConversationManager.mm +0 -71
- package/lib/module/constants/llamaDefaults.js.map +0 -1
- package/lib/module/modules/computer_vision/BaseCVModule.js +0 -14
- package/lib/module/modules/computer_vision/BaseCVModule.js.map +0 -1
- package/lib/module/types/object_detection.js.map +0 -1
- package/lib/module/utils/fetchResource.js +0 -93
- package/lib/module/utils/fetchResource.js.map +0 -1
- package/lib/module/utils/listDownloadedResources.js +0 -13
- package/lib/module/utils/listDownloadedResources.js.map +0 -1
- package/lib/typescript/constants/llamaDefaults.d.ts.map +0 -1
- package/lib/typescript/modules/computer_vision/BaseCVModule.d.ts +0 -9
- package/lib/typescript/modules/computer_vision/BaseCVModule.d.ts.map +0 -1
- package/lib/typescript/types/object_detection.d.ts.map +0 -1
- package/lib/typescript/utils/fetchResource.d.ts +0 -3
- package/lib/typescript/utils/fetchResource.d.ts.map +0 -1
- package/lib/typescript/utils/listDownloadedResources.d.ts +0 -3
- package/lib/typescript/utils/listDownloadedResources.d.ts.map +0 -1
- package/src/constants/llamaDefaults.ts +0 -9
- package/src/modules/computer_vision/BaseCVModule.ts +0 -22
- package/src/utils/fetchResource.ts +0 -106
- package/src/utils/listDownloadedResources.ts +0 -12
- /package/src/types/{object_detection.ts → objectDetection.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm.d.ts","sourceRoot":"","sources":["../../../src/utils/llm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEjD,eAAO,MAAM,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,QAAQ,EA+BxD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stt.d.ts","sourceRoot":"","sources":["../../../src/utils/stt.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,GAC5B,MAAM,MAAM,EAAE,EACd,MAAM,MAAM,EAAE,EACd,sBAAsB,MAAM,WAwB7B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-executorch",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "An easy way to run AI models in react native with ExecuTorch",
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"main": "./lib/commonjs/index.js",
|
|
@@ -60,25 +60,27 @@
|
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@commitlint/config-conventional": "^17.0.2",
|
|
63
|
+
"@cspell/eslint-plugin": "^8.18.1",
|
|
63
64
|
"@evilmartians/lefthook": "^1.5.0",
|
|
64
65
|
"@react-native-community/cli": "latest",
|
|
65
|
-
"@react-native/eslint-config": "^0.
|
|
66
|
+
"@react-native/eslint-config": "^0.79.0",
|
|
66
67
|
"@release-it/conventional-changelog": "^5.0.0",
|
|
67
68
|
"@types/jest": "^29.5.5",
|
|
68
|
-
"@types/react": "
|
|
69
|
+
"@types/react": "^18.2.44",
|
|
69
70
|
"commitlint": "^17.0.2",
|
|
71
|
+
"cspell": "^8.19.2",
|
|
70
72
|
"del-cli": "^5.1.0",
|
|
71
|
-
"eslint": "^8.
|
|
73
|
+
"eslint": "^8.57.1",
|
|
72
74
|
"eslint-config-prettier": "^9.0.0",
|
|
73
75
|
"eslint-plugin-prettier": "^5.0.1",
|
|
74
76
|
"jest": "^29.7.0",
|
|
75
77
|
"metro-react-native-babel-preset": "^0.77.0",
|
|
76
78
|
"prettier": "^3.0.3",
|
|
77
|
-
"react": "19.
|
|
78
|
-
"react-native": "0.79.2",
|
|
79
|
+
"react": "^19.1.0",
|
|
80
|
+
"react-native": "^0.79.2",
|
|
79
81
|
"react-native-builder-bob": "^0.30.2",
|
|
80
82
|
"turbo": "^1.10.7",
|
|
81
|
-
"typescript": "
|
|
83
|
+
"typescript": "^5.2.2"
|
|
82
84
|
},
|
|
83
85
|
"resolutions": {
|
|
84
86
|
"@types/react": "^18.2.44"
|
|
@@ -120,45 +122,6 @@
|
|
|
120
122
|
}
|
|
121
123
|
}
|
|
122
124
|
},
|
|
123
|
-
"eslintConfig": {
|
|
124
|
-
"parserOptions": {
|
|
125
|
-
"requireConfigFile": false,
|
|
126
|
-
"babelOptions": {
|
|
127
|
-
"presets": [
|
|
128
|
-
"@babel/preset-react"
|
|
129
|
-
]
|
|
130
|
-
}
|
|
131
|
-
},
|
|
132
|
-
"root": true,
|
|
133
|
-
"extends": [
|
|
134
|
-
"@react-native",
|
|
135
|
-
"prettier"
|
|
136
|
-
],
|
|
137
|
-
"rules": {
|
|
138
|
-
"react/react-in-jsx-scope": "off",
|
|
139
|
-
"prettier/prettier": [
|
|
140
|
-
"error",
|
|
141
|
-
{
|
|
142
|
-
"quoteProps": "consistent",
|
|
143
|
-
"singleQuote": true,
|
|
144
|
-
"tabWidth": 2,
|
|
145
|
-
"trailingComma": "es5",
|
|
146
|
-
"useTabs": false
|
|
147
|
-
}
|
|
148
|
-
]
|
|
149
|
-
}
|
|
150
|
-
},
|
|
151
|
-
"eslintIgnore": [
|
|
152
|
-
"node_modules/",
|
|
153
|
-
"lib/"
|
|
154
|
-
],
|
|
155
|
-
"prettier": {
|
|
156
|
-
"quoteProps": "consistent",
|
|
157
|
-
"singleQuote": true,
|
|
158
|
-
"tabWidth": 2,
|
|
159
|
-
"trailingComma": "es5",
|
|
160
|
-
"useTabs": false
|
|
161
|
-
},
|
|
162
125
|
"babel": {
|
|
163
126
|
"presets": [
|
|
164
127
|
"module:metro-react-native-babel-preset"
|
|
@@ -186,16 +149,17 @@
|
|
|
186
149
|
},
|
|
187
150
|
"codegenConfig": {
|
|
188
151
|
"name": "RnExecutorchSpec",
|
|
189
|
-
"type": "
|
|
152
|
+
"type": "modules",
|
|
190
153
|
"jsSrcsDir": "./src/native",
|
|
191
154
|
"android": {
|
|
192
155
|
"javaPackageName": "com.swmansion.rnexecutorch"
|
|
193
156
|
}
|
|
194
157
|
},
|
|
195
158
|
"dependencies": {
|
|
196
|
-
"
|
|
159
|
+
"@huggingface/jinja": "^0.5.0",
|
|
160
|
+
"expo": "^53.0.7",
|
|
197
161
|
"expo-asset": "~11.1.5",
|
|
198
|
-
"expo-file-system": "~18.1.
|
|
162
|
+
"expo-file-system": "~18.1.10",
|
|
199
163
|
"react-native-live-audio-stream": "^1.1.1"
|
|
200
164
|
}
|
|
201
165
|
}
|
|
@@ -11,7 +11,7 @@ Pod::Spec.new do |s|
|
|
|
11
11
|
s.authors = package["author"]
|
|
12
12
|
|
|
13
13
|
s.platforms = { :ios => min_ios_version_supported }
|
|
14
|
-
s.source = { :git => "https://github.com/
|
|
14
|
+
s.source = { :git => "https://github.com/software-mansion/react-native-executorch.git", :tag => "#{s.version}" }
|
|
15
15
|
|
|
16
16
|
s.ios.vendored_frameworks = "ios/ExecutorchLib.xcframework"
|
|
17
17
|
s.source_files = "ios/**/*.{h,m,mm}"
|
package/src/Error.ts
CHANGED
|
@@ -7,6 +7,11 @@ export enum ETError {
|
|
|
7
7
|
LanguageNotSupported = 0x69,
|
|
8
8
|
InvalidModelSource = 0xff,
|
|
9
9
|
|
|
10
|
+
//SpeechToText errors
|
|
11
|
+
MultilingualConfiguration = 0xa0,
|
|
12
|
+
MissingDataChunk = 0xa1,
|
|
13
|
+
StreamingNotStarted = 0xa2,
|
|
14
|
+
|
|
10
15
|
// ExecuTorch mapped errors
|
|
11
16
|
// Based on: https://github.com/pytorch/executorch/blob/main/runtime/core/error.h
|
|
12
17
|
// System errors
|
|
@@ -34,14 +39,22 @@ export enum ETError {
|
|
|
34
39
|
DelegateInvalidHandle = 0x32,
|
|
35
40
|
}
|
|
36
41
|
|
|
37
|
-
export const getError = (e: unknown | ETError): string => {
|
|
42
|
+
export const getError = (e: unknown | ETError | Error): string => {
|
|
38
43
|
if (typeof e === 'number') {
|
|
39
44
|
if (e in ETError) return ETError[e] as string;
|
|
40
45
|
return ETError[ETError.UndefinedError] as string;
|
|
41
46
|
}
|
|
42
47
|
|
|
48
|
+
// try to extract number from message (can contain false positives)
|
|
43
49
|
const error = e as Error;
|
|
44
50
|
const errorCode = parseInt(error.message, 10);
|
|
45
|
-
|
|
46
|
-
|
|
51
|
+
const message = Number.isNaN(errorCode)
|
|
52
|
+
? error.message
|
|
53
|
+
: ' ' + error.message.slice(`${errorCode}`.length).trimStart();
|
|
54
|
+
|
|
55
|
+
const ETErrorMessage = (
|
|
56
|
+
errorCode in ETError ? ETError[errorCode] : ETError[ETError.UndefinedError]
|
|
57
|
+
) as string;
|
|
58
|
+
|
|
59
|
+
return ETErrorMessage + message;
|
|
47
60
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ChatConfig, Message } from '../types/llm';
|
|
2
|
+
|
|
3
|
+
export const DEFAULT_SYSTEM_PROMPT =
|
|
4
|
+
"You are a knowledgeable, efficient, and direct AI assistant. Provide concise answers, focusing on the key information needed. Offer suggestions tactfully when appropriate to improve outcomes. Engage in productive collaboration with the user. Don't return too much text.";
|
|
5
|
+
|
|
6
|
+
export const DEFAULT_MESSAGE_HISTORY: Message[] = [];
|
|
7
|
+
|
|
8
|
+
export const DEFAULT_CONTEXT_WINDOW_LENGTH = 5;
|
|
9
|
+
|
|
10
|
+
export const DEFAULT_CHAT_CONFIG: ChatConfig = {
|
|
11
|
+
systemPrompt: DEFAULT_SYSTEM_PROMPT,
|
|
12
|
+
initialMessageHistory: DEFAULT_MESSAGE_HISTORY,
|
|
13
|
+
contextWindowLength: DEFAULT_CONTEXT_WINDOW_LENGTH,
|
|
14
|
+
};
|
|
@@ -1,82 +1,187 @@
|
|
|
1
1
|
import { Platform } from 'react-native';
|
|
2
2
|
|
|
3
3
|
// LLM's
|
|
4
|
+
|
|
5
|
+
// LLAMA 3.2
|
|
4
6
|
export const LLAMA3_2_3B =
|
|
5
|
-
'https://huggingface.co/software-mansion/react-native-executorch-llama-3.2/resolve/v0.
|
|
7
|
+
'https://huggingface.co/software-mansion/react-native-executorch-llama-3.2/resolve/v0.4.0/llama-3.2-3B/original/llama3_2_3B_bf16.pte';
|
|
6
8
|
export const LLAMA3_2_3B_QLORA =
|
|
7
|
-
'https://huggingface.co/software-mansion/react-native-executorch-llama-3.2/resolve/v0.
|
|
9
|
+
'https://huggingface.co/software-mansion/react-native-executorch-llama-3.2/resolve/v0.4.0/llama-3.2-3B/QLoRA/llama3_2-3B_qat_lora.pte';
|
|
8
10
|
export const LLAMA3_2_3B_SPINQUANT =
|
|
9
|
-
'https://huggingface.co/software-mansion/react-native-executorch-llama-3.2/resolve/v0.
|
|
11
|
+
'https://huggingface.co/software-mansion/react-native-executorch-llama-3.2/resolve/v0.4.0/llama-3.2-3B/spinquant/llama3_2_3B_spinquant.pte';
|
|
10
12
|
export const LLAMA3_2_1B =
|
|
11
|
-
'https://huggingface.co/software-mansion/react-native-executorch-llama-3.2/resolve/v0.
|
|
13
|
+
'https://huggingface.co/software-mansion/react-native-executorch-llama-3.2/resolve/v0.4.0/llama-3.2-1B/original/llama3_2_bf16.pte';
|
|
12
14
|
export const LLAMA3_2_1B_QLORA =
|
|
13
|
-
'https://huggingface.co/software-mansion/react-native-executorch-llama-3.2/resolve/v0.
|
|
15
|
+
'https://huggingface.co/software-mansion/react-native-executorch-llama-3.2/resolve/v0.4.0/llama-3.2-1B/QLoRA/llama3_2_qat_lora.pte';
|
|
14
16
|
export const LLAMA3_2_1B_SPINQUANT =
|
|
15
|
-
'https://huggingface.co/software-mansion/react-native-executorch-llama-3.2/resolve/v0.
|
|
16
|
-
export const
|
|
17
|
-
'https://huggingface.co/software-mansion/react-native-executorch-llama-3.2/resolve/v0.
|
|
18
|
-
export const
|
|
19
|
-
'https://huggingface.co/software-mansion/react-native-executorch-llama-3.2/resolve/v0.
|
|
17
|
+
'https://huggingface.co/software-mansion/react-native-executorch-llama-3.2/resolve/v0.4.0/llama-3.2-1B/spinquant/llama3_2_spinquant.pte';
|
|
18
|
+
export const LLAMA3_2_TOKENIZER =
|
|
19
|
+
'https://huggingface.co/software-mansion/react-native-executorch-llama-3.2/resolve/v0.4.0/tokenizer.json';
|
|
20
|
+
export const LLAMA3_2_TOKENIZER_CONFIG =
|
|
21
|
+
'https://huggingface.co/software-mansion/react-native-executorch-llama-3.2/resolve/v0.4.0/tokenizer_config.json';
|
|
22
|
+
|
|
23
|
+
// QWEN 3
|
|
24
|
+
export const QWEN3_0_6B =
|
|
25
|
+
'https://huggingface.co/software-mansion/react-native-executorch-qwen-3/resolve/v0.4.0/qwen-3-0.6B/original/qwen3_0_6b_bf16.pte';
|
|
26
|
+
export const QWEN3_0_6B_QUANTIZED =
|
|
27
|
+
'https://huggingface.co/software-mansion/react-native-executorch-qwen-3/resolve/v0.4.0/qwen-3-0.6B/quantized/qwen3_0_6b_8da4w.pte';
|
|
28
|
+
export const QWEN3_1_7B =
|
|
29
|
+
'https://huggingface.co/software-mansion/react-native-executorch-qwen-3/resolve/v0.4.0/qwen-3-1.7B/original/qwen3_1_7b_bf16.pte';
|
|
30
|
+
export const QWEN3_1_7B_QUANTIZED =
|
|
31
|
+
'https://huggingface.co/software-mansion/react-native-executorch-qwen-3/resolve/v0.4.0/qwen-3-1.7B/quantized/qwen3_1_7b_8da4w.pte';
|
|
32
|
+
export const QWEN3_4B =
|
|
33
|
+
'https://huggingface.co/software-mansion/react-native-executorch-qwen-3/resolve/v0.4.0/qwen-3-4B/original/qwen3_4b_bf16.pte';
|
|
34
|
+
export const QWEN3_4B_QUANTIZED =
|
|
35
|
+
'https://huggingface.co/software-mansion/react-native-executorch-qwen-3/resolve/v0.4.0/qwen-3-4B/quantized/qwen3_4b_8da4w.pte';
|
|
36
|
+
export const QWEN3_TOKENIZER =
|
|
37
|
+
'https://huggingface.co/software-mansion/react-native-executorch-qwen-3/resolve/v0.4.0/tokenizer.json';
|
|
38
|
+
export const QWEN3_TOKENIZER_CONFIG =
|
|
39
|
+
'https://huggingface.co/software-mansion/react-native-executorch-qwen-3/resolve/v0.4.0/tokenizer_config.json';
|
|
40
|
+
|
|
41
|
+
// HAMMER 2.1
|
|
42
|
+
export const HAMMER2_1_0_5B =
|
|
43
|
+
'https://huggingface.co/software-mansion/react-native-executorch-hammer-2.1/resolve/v0.4.0/hammer-2.1-0.5B/original/hammer2_1_0_5B_bf16.pte';
|
|
44
|
+
export const HAMMER2_1_0_5B_QUANTIZED =
|
|
45
|
+
'https://huggingface.co/software-mansion/react-native-executorch-hammer-2.1/resolve/v0.4.0/hammer-2.1-0.5B/quantized/hammer2_1_0_5B_8da4w.pte';
|
|
46
|
+
export const HAMMER2_1_1_5B =
|
|
47
|
+
'https://huggingface.co/software-mansion/react-native-executorch-hammer-2.1/resolve/v0.4.0/hammer-2.1-1.5B/original/hammer2_1_1_5B_bf16.pte';
|
|
48
|
+
export const HAMMER2_1_1_5B_QUANTIZED =
|
|
49
|
+
'https://huggingface.co/software-mansion/react-native-executorch-hammer-2.1/resolve/v0.4.0/hammer-2.1-1.5B/quantized/hammer2_1_1_5B_8da4w.pte';
|
|
50
|
+
export const HAMMER2_1_3B =
|
|
51
|
+
'https://huggingface.co/software-mansion/react-native-executorch-hammer-2.1/resolve/v0.4.0/hammer-2.1-3B/original/hammer2_1_3B_bf16.pte';
|
|
52
|
+
export const HAMMER2_1_3B_QUANTIZED =
|
|
53
|
+
'https://huggingface.co/software-mansion/react-native-executorch-hammer-2.1/resolve/v0.4.0/hammer-2.1-3B/quantized/hammer2_1_3B_8da4w.pte';
|
|
54
|
+
export const HAMMER2_1_TOKENIZER =
|
|
55
|
+
'https://huggingface.co/software-mansion/react-native-executorch-hammer-2.1/resolve/v0.4.0/tokenizer.json';
|
|
56
|
+
export const HAMMER2_1_TOKENIZER_CONFIG =
|
|
57
|
+
'https://huggingface.co/software-mansion/react-native-executorch-hammer-2.1/resolve/v0.4.0/tokenizer_config.json';
|
|
58
|
+
|
|
59
|
+
// SMOLLM2
|
|
60
|
+
export const SMOLLM2_1_135M =
|
|
61
|
+
'https://huggingface.co/software-mansion/react-native-executorch-smolLm-2/resolve/v0.4.0/smolLm-2-135M/original/smolLm2_135M_bf16.pte';
|
|
62
|
+
export const SMOLLM2_1_135M_QUANTIZED =
|
|
63
|
+
'https://huggingface.co/software-mansion/react-native-executorch-smolLm-2/resolve/v0.4.0/smolLm-2-135M/quantized/smolLm2_135M_8da4w.pte';
|
|
64
|
+
export const SMOLLM2_1_360M =
|
|
65
|
+
'https://huggingface.co/software-mansion/react-native-executorch-smolLm-2/resolve/v0.4.0/smolLm-2-360M/original/smolLm2_360M_bf16.pte';
|
|
66
|
+
export const SMOLLM2_1_360M_QUANTIZED =
|
|
67
|
+
'https://huggingface.co/software-mansion/react-native-executorch-smolLm-2/resolve/v0.4.0/smolLm-2-360M/quantized/smolLm2_360M_8da4w.pte';
|
|
68
|
+
export const SMOLLM2_1_1_7B =
|
|
69
|
+
'https://huggingface.co/software-mansion/react-native-executorch-smolLm-2/resolve/v0.4.0/smolLm-2-1.7B/original/smolLm2_1_7B_bf16.pte';
|
|
70
|
+
export const SMOLLM2_1_1_7B_QUANTIZED =
|
|
71
|
+
'https://huggingface.co/software-mansion/react-native-executorch-smolLm-2/resolve/v0.4.0/smolLm-2-1.7B/quantized/smolLm2_1_7B_8da4w.pte';
|
|
72
|
+
export const SMOLLM2_1_TOKENIZER =
|
|
73
|
+
'https://huggingface.co/software-mansion/react-native-executorch-smolLm-2/resolve/v0.4.0/tokenizer.json';
|
|
74
|
+
export const SMOLLM2_1_TOKENIZER_CONFIG =
|
|
75
|
+
'https://huggingface.co/software-mansion/react-native-executorch-smolLm-2/resolve/v0.4.0/tokenizer_config.json';
|
|
76
|
+
|
|
77
|
+
// QWEN 2.5
|
|
78
|
+
export const QWEN2_5_0_5B =
|
|
79
|
+
'https://huggingface.co/software-mansion/react-native-executorch-qwen-2.5/resolve/v0.4.0/qwen-2.5-0.5B/original/qwen2_5_0_5b_bf16.pte';
|
|
80
|
+
export const QWEN2_5_0_5B_QUANTIZED =
|
|
81
|
+
'https://huggingface.co/software-mansion/react-native-executorch-qwen-2.5/resolve/v0.4.0/qwen-2.5-0.5B/quantized/qwen2_5_0_5b_8da4w.pte';
|
|
82
|
+
export const QWEN2_5_1_5B =
|
|
83
|
+
'https://huggingface.co/software-mansion/react-native-executorch-qwen-2.5/resolve/v0.4.0/qwen-2.5-1.5B/original/qwen2_5_1_5b_bf16.pte';
|
|
84
|
+
export const QWEN2_5_1_5B_QUANTIZED =
|
|
85
|
+
'https://huggingface.co/software-mansion/react-native-executorch-qwen-2.5/resolve/v0.4.0/qwen-2.5-1.5B/quantized/qwen2_5_1_5b_8da4w.pte';
|
|
86
|
+
export const QWEN2_5_3B =
|
|
87
|
+
'https://huggingface.co/software-mansion/react-native-executorch-qwen-2.5/resolve/v0.4.0/qwen-2.5-3B/original/qwen2_5_3b_bf16.pte';
|
|
88
|
+
export const QWEN2_5_3B_QUANTIZED =
|
|
89
|
+
'https://huggingface.co/software-mansion/react-native-executorch-qwen-2.5/resolve/v0.4.0/qwen-2.5-3B/quantized/qwen2_5_3b_8da4w.pte';
|
|
90
|
+
export const QWEN2_5_TOKENIZER =
|
|
91
|
+
'https://huggingface.co/software-mansion/react-native-executorch-qwen-2.5/resolve/v0.4.0/tokenizer.json';
|
|
92
|
+
export const QWEN2_5_TOKENIZER_CONFIG =
|
|
93
|
+
'https://huggingface.co/software-mansion/react-native-executorch-qwen-2.5/resolve/v0.4.0/tokenizer_config.json';
|
|
94
|
+
|
|
95
|
+
// PHI 4
|
|
96
|
+
export const PHI_4_MINI_4B =
|
|
97
|
+
'https://huggingface.co/software-mansion/react-native-executorch-phi-4-mini/resolve/v0.4.0/original/phi-4-mini_bf16.pte';
|
|
98
|
+
export const PHI_4_MINI_4B_QUANTIZED =
|
|
99
|
+
'https://huggingface.co/software-mansion/react-native-executorch-phi-4-mini/resolve/v0.4.0/quantized/phi-4-mini_8da4w.pte';
|
|
100
|
+
export const PHI_4_MINI_TOKENIZER =
|
|
101
|
+
'https://huggingface.co/software-mansion/react-native-executorch-phi-4-mini/resolve/v0.4.0/tokenizer.json';
|
|
102
|
+
export const PHI_4_MINI_TOKENIZER_CONFIG =
|
|
103
|
+
'https://huggingface.co/software-mansion/react-native-executorch-phi-4-mini/resolve/v0.4.0/tokenizer_config.json';
|
|
20
104
|
|
|
21
105
|
// Classification
|
|
22
106
|
export const EFFICIENTNET_V2_S =
|
|
23
107
|
Platform.OS === 'ios'
|
|
24
|
-
? 'https://huggingface.co/software-mansion/react-native-executorch-efficientnet-v2-s/resolve/v0.
|
|
25
|
-
: 'https://huggingface.co/software-mansion/react-native-executorch-efficientnet-v2-s/resolve/v0.
|
|
108
|
+
? 'https://huggingface.co/software-mansion/react-native-executorch-efficientnet-v2-s/resolve/v0.4.0/coreml/efficientnet_v2_s_coreml_all.pte'
|
|
109
|
+
: 'https://huggingface.co/software-mansion/react-native-executorch-efficientnet-v2-s/resolve/v0.4.0/xnnpack/efficientnet_v2_s_xnnpack.pte';
|
|
26
110
|
|
|
27
111
|
// Object detection
|
|
28
112
|
export const SSDLITE_320_MOBILENET_V3_LARGE =
|
|
29
|
-
'https://huggingface.co/software-mansion/react-native-executorch-ssdlite320-mobilenet-v3-large/resolve/v0.
|
|
113
|
+
'https://huggingface.co/software-mansion/react-native-executorch-ssdlite320-mobilenet-v3-large/resolve/v0.4.0/ssdlite320-mobilenetv3-large.pte';
|
|
30
114
|
|
|
31
115
|
// Style transfer
|
|
32
116
|
export const STYLE_TRANSFER_CANDY =
|
|
33
117
|
Platform.OS === 'ios'
|
|
34
|
-
? 'https://huggingface.co/software-mansion/react-native-executorch-style-transfer-candy/resolve/v0.
|
|
35
|
-
: 'https://huggingface.co/software-mansion/react-native-executorch-style-transfer-candy/resolve/v0.
|
|
118
|
+
? 'https://huggingface.co/software-mansion/react-native-executorch-style-transfer-candy/resolve/v0.4.0/coreml/style_transfer_candy_coreml.pte'
|
|
119
|
+
: 'https://huggingface.co/software-mansion/react-native-executorch-style-transfer-candy/resolve/v0.4.0/xnnpack/style_transfer_candy_xnnpack.pte';
|
|
36
120
|
export const STYLE_TRANSFER_MOSAIC =
|
|
37
121
|
Platform.OS === 'ios'
|
|
38
|
-
? 'https://huggingface.co/software-mansion/react-native-executorch-style-transfer-mosaic/resolve/v0.
|
|
39
|
-
: 'https://huggingface.co/software-mansion/react-native-executorch-style-transfer-mosaic/resolve/v0.
|
|
122
|
+
? 'https://huggingface.co/software-mansion/react-native-executorch-style-transfer-mosaic/resolve/v0.4.0/coreml/style_transfer_mosaic_coreml.pte'
|
|
123
|
+
: 'https://huggingface.co/software-mansion/react-native-executorch-style-transfer-mosaic/resolve/v0.4.0/xnnpack/style_transfer_mosaic_xnnpack.pte';
|
|
40
124
|
export const STYLE_TRANSFER_RAIN_PRINCESS =
|
|
41
125
|
Platform.OS === 'ios'
|
|
42
|
-
? 'https://huggingface.co/software-mansion/react-native-executorch-style-transfer-rain-princess/resolve/v0.
|
|
43
|
-
: 'https://huggingface.co/software-mansion/react-native-executorch-style-transfer-rain-princess/resolve/v0.
|
|
126
|
+
? 'https://huggingface.co/software-mansion/react-native-executorch-style-transfer-rain-princess/resolve/v0.4.0/coreml/style_transfer_rain_princess_coreml.pte'
|
|
127
|
+
: 'https://huggingface.co/software-mansion/react-native-executorch-style-transfer-rain-princess/resolve/v0.4.0/xnnpack/style_transfer_rain_princess_xnnpack.pte';
|
|
44
128
|
export const STYLE_TRANSFER_UDNIE =
|
|
45
129
|
Platform.OS === 'ios'
|
|
46
|
-
? 'https://huggingface.co/software-mansion/react-native-executorch-style-transfer-udnie/resolve/v0.
|
|
47
|
-
: 'https://huggingface.co/software-mansion/react-native-executorch-style-transfer-udnie/resolve/v0.
|
|
130
|
+
? 'https://huggingface.co/software-mansion/react-native-executorch-style-transfer-udnie/resolve/v0.4.0/coreml/style_transfer_udnie_coreml.pte'
|
|
131
|
+
: 'https://huggingface.co/software-mansion/react-native-executorch-style-transfer-udnie/resolve/v0.4.0/xnnpack/style_transfer_udnie_xnnpack.pte';
|
|
48
132
|
|
|
49
133
|
// S2T
|
|
50
134
|
export const MOONSHINE_TINY_DECODER =
|
|
51
|
-
'https://huggingface.co/software-mansion/react-native-executorch-moonshine-tiny/resolve/v0.
|
|
135
|
+
'https://huggingface.co/software-mansion/react-native-executorch-moonshine-tiny/resolve/v0.4.0/xnnpack/moonshine_tiny_xnnpack_decoder.pte';
|
|
52
136
|
export const MOONSHINE_TINY_ENCODER =
|
|
53
|
-
'https://huggingface.co/software-mansion/react-native-executorch-moonshine-tiny/resolve/v0.
|
|
137
|
+
'https://huggingface.co/software-mansion/react-native-executorch-moonshine-tiny/resolve/v0.4.0/xnnpack/moonshine_tiny_xnnpack_encoder.pte';
|
|
54
138
|
export const MOONSHINE_TOKENIZER =
|
|
55
|
-
'https://huggingface.co/software-mansion/react-native-executorch-moonshine-tiny/resolve/v0.
|
|
139
|
+
'https://huggingface.co/software-mansion/react-native-executorch-moonshine-tiny/resolve/v0.4.0/moonshine_tiny_tokenizer.json';
|
|
56
140
|
export const WHISPER_TOKENIZER =
|
|
57
|
-
'https://huggingface.co/software-mansion/react-native-executorch-whisper-tiny.en/resolve/v0.
|
|
141
|
+
'https://huggingface.co/software-mansion/react-native-executorch-whisper-tiny.en/resolve/v0.4.0/whisper_tokenizer.json';
|
|
58
142
|
export const WHISPER_TINY_DECODER =
|
|
59
|
-
'https://huggingface.co/software-mansion/react-native-executorch-whisper-tiny.en/resolve/v0.
|
|
143
|
+
'https://huggingface.co/software-mansion/react-native-executorch-whisper-tiny.en/resolve/v0.4.0/xnnpack/whisper_tiny_en_xnnpack_decoder.pte';
|
|
60
144
|
export const WHISPER_TINY_ENCODER =
|
|
61
|
-
'https://huggingface.co/software-mansion/react-native-executorch-whisper-tiny.en/resolve/v0.
|
|
145
|
+
'https://huggingface.co/software-mansion/react-native-executorch-whisper-tiny.en/resolve/v0.4.0/xnnpack/whisper_tiny_en_xnnpack_encoder.pte';
|
|
146
|
+
export const WHISPER_TINY_MULTILINGUAL_ENCODER =
|
|
147
|
+
'https://huggingface.co/software-mansion/react-native-executorch-whisper-tiny/resolve/v0.4.0/xnnpack/xnnpack_whisper_encoder.pte';
|
|
148
|
+
export const WHISPER_TINY_MULTILINGUAL_DECODER =
|
|
149
|
+
'https://huggingface.co/software-mansion/react-native-executorch-whisper-tiny/resolve/v0.4.0/xnnpack/xnnpack_whisper_decoder.pte';
|
|
150
|
+
export const WHISPER_TINY_MULTILINGUAL_TOKENIZER =
|
|
151
|
+
'https://huggingface.co/software-mansion/react-native-executorch-whisper-tiny/resolve/v0.4.0/tokenizer.json';
|
|
62
152
|
|
|
63
153
|
// OCR
|
|
64
|
-
|
|
65
154
|
export const DETECTOR_CRAFT_1280 =
|
|
66
|
-
'https://huggingface.co/software-mansion/react-native-executorch-detector-craft/resolve/v0.
|
|
155
|
+
'https://huggingface.co/software-mansion/react-native-executorch-detector-craft/resolve/v0.4.0/xnnpack/xnnpack_craft_1280.pte';
|
|
67
156
|
export const DETECTOR_CRAFT_800 =
|
|
68
|
-
'https://huggingface.co/software-mansion/react-native-executorch-detector-craft/resolve/v0.
|
|
157
|
+
'https://huggingface.co/software-mansion/react-native-executorch-detector-craft/resolve/v0.4.0/xnnpack/xnnpack_craft_800.pte';
|
|
69
158
|
export const DETECTOR_CRAFT_320 =
|
|
70
|
-
'https://huggingface.co/software-mansion/react-native-executorch-detector-craft/resolve/v0.
|
|
159
|
+
'https://huggingface.co/software-mansion/react-native-executorch-detector-craft/resolve/v0.4.0/xnnpack/xnnpack_craft_320.pte';
|
|
160
|
+
|
|
161
|
+
// Image segmentation
|
|
162
|
+
export const DEEPLAB_V3_RESNET50 =
|
|
163
|
+
'https://huggingface.co/software-mansion/react-native-executorch-deeplab-v3/resolve/v0.4.0/xnnpack/deeplabV3_xnnpack_fp32.pte';
|
|
164
|
+
|
|
165
|
+
// Text Embeddings
|
|
166
|
+
export const ALL_MINILM_L6_V2 =
|
|
167
|
+
'https://huggingface.co/software-mansion/react-native-executorch-all-MiniLM-L6-v2/resolve/v0.4.0/all-MiniLM-L6-v2_xnnpack.pte';
|
|
168
|
+
export const ALL_MINILM_L6_V2_TOKENIZER =
|
|
169
|
+
'https://huggingface.co/software-mansion/react-native-executorch-all-MiniLM-L6-v2/resolve/v0.4.0/tokenizer.json';
|
|
170
|
+
|
|
171
|
+
export const ALL_MPNET_BASE_V2 =
|
|
172
|
+
'https://huggingface.co/software-mansion/react-native-executorch-all-mpnet-base-v2/resolve/v0.4.0/all-mpnet-base-v2_xnnpack.pte';
|
|
173
|
+
export const ALL_MPNET_BASE_V2_TOKENIZER =
|
|
174
|
+
'https://huggingface.co/software-mansion/react-native-executorch-all-mpnet-base-v2/resolve/v0.4.0/tokenizer.json';
|
|
175
|
+
|
|
176
|
+
export const MULTI_QA_MINILM_L6_COS_V1 =
|
|
177
|
+
'https://huggingface.co/software-mansion/react-native-executorch-multi-qa-MiniLM-L6-cos-v1/resolve/v0.4.0/multi-qa-MiniLM-L6-cos-v1_xnnpack.pte';
|
|
178
|
+
export const MULTI_QA_MINILM_L6_COS_V1_TOKENIZER =
|
|
179
|
+
'https://huggingface.co/software-mansion/react-native-executorch-multi-qa-MiniLM-L6-cos-v1/resolve/v0.4.0/tokenizer.json';
|
|
71
180
|
|
|
72
|
-
export const
|
|
73
|
-
'https://huggingface.co/software-mansion/react-native-executorch-
|
|
74
|
-
export const
|
|
75
|
-
'https://huggingface.co/software-mansion/react-native-executorch-
|
|
76
|
-
export const RECOGNIZER_EN_CRNN_128 =
|
|
77
|
-
'https://huggingface.co/software-mansion/react-native-executorch-recognizer-crnn.en/resolve/v0.3.0/xnnpack/xnnpack_crnn_en_128.pte';
|
|
78
|
-
export const RECOGNIZER_EN_CRNN_64 =
|
|
79
|
-
'https://huggingface.co/software-mansion/react-native-executorch-recognizer-crnn.en/resolve/v0.3.0/xnnpack/xnnpack_crnn_en_64.pte';
|
|
181
|
+
export const MULTI_QA_MPNET_BASE_DOT_V1 =
|
|
182
|
+
'https://huggingface.co/software-mansion/react-native-executorch-multi-qa-mpnet-base-dot-v1/resolve/v0.4.0/multi-qa-mpnet-base-dot-v1_xnnpack.pte';
|
|
183
|
+
export const MULTI_QA_MPNET_BASE_DOT_V1_TOKENIZER =
|
|
184
|
+
'https://huggingface.co/software-mansion/react-native-executorch-multi-qa-mpnet-base-dot-v1/resolve/v0.4.0/tokenizer.json';
|
|
80
185
|
|
|
81
186
|
// Backward compatibility
|
|
82
187
|
export const LLAMA3_2_3B_URL = LLAMA3_2_3B;
|
|
@@ -85,3 +190,5 @@ export const LLAMA3_2_3B_SPINQUANT_URL = LLAMA3_2_3B_SPINQUANT;
|
|
|
85
190
|
export const LLAMA3_2_1B_URL = LLAMA3_2_1B;
|
|
86
191
|
export const LLAMA3_2_1B_QLORA_URL = LLAMA3_2_1B_QLORA;
|
|
87
192
|
export const LLAMA3_2_1B_SPINQUANT_URL = LLAMA3_2_1B_SPINQUANT;
|
|
193
|
+
export const LLAMA3_2_1B_TOKENIZER = LLAMA3_2_TOKENIZER;
|
|
194
|
+
export const LLAMA3_2_3B_TOKENIZER = LLAMA3_2_TOKENIZER;
|