whisper.rn 0.5.4 → 0.5.5
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/android/src/main/java/com/rnwhisper/WhisperContext.java +5 -0
- package/android/src/main/jni.cpp +13 -0
- package/cpp/ggml-alloc.c +78 -26
- package/cpp/ggml-alloc.h +9 -0
- package/cpp/ggml-backend-impl.h +1 -1
- package/cpp/ggml-backend-reg.cpp +19 -3
- package/cpp/ggml-backend.cpp +72 -20
- package/cpp/ggml-backend.h +2 -1
- package/cpp/ggml-cpu/arch/arm/cpu-feats.cpp +4 -0
- package/cpp/ggml-cpu/arch/arm/repack.cpp +1004 -0
- package/cpp/ggml-cpu/arch/x86/repack.cpp +6 -6
- package/cpp/ggml-cpu/arch-fallback.h +50 -2
- package/cpp/ggml-cpu/ggml-cpu-impl.h +1 -1
- package/cpp/ggml-cpu/ggml-cpu.c +139 -58
- package/cpp/ggml-cpu/ggml-cpu.cpp +4 -0
- package/cpp/ggml-cpu/ops.cpp +170 -18
- package/cpp/ggml-cpu/ops.h +1 -0
- package/cpp/ggml-cpu/repack.cpp +531 -5
- package/cpp/ggml-cpu/repack.h +14 -0
- package/cpp/ggml-cpu/simd-mappings.h +16 -18
- package/cpp/ggml-cpu/vec.cpp +41 -1
- package/cpp/ggml-cpu/vec.h +241 -138
- package/cpp/ggml-cpu.h +1 -0
- package/cpp/ggml-impl.h +0 -4
- package/cpp/ggml-metal/ggml-metal-context.m +26 -16
- package/cpp/ggml-metal/ggml-metal-device.cpp +452 -371
- package/cpp/ggml-metal/ggml-metal-device.h +87 -65
- package/cpp/ggml-metal/ggml-metal-device.m +263 -104
- package/cpp/ggml-metal/ggml-metal-impl.h +58 -4
- package/cpp/ggml-metal/ggml-metal-ops.cpp +415 -98
- package/cpp/ggml-metal/ggml-metal-ops.h +4 -0
- package/cpp/ggml-metal/ggml-metal.cpp +6 -5
- package/cpp/ggml-metal/ggml-metal.metal +404 -34
- package/cpp/ggml.c +110 -31
- package/cpp/ggml.h +51 -12
- package/cpp/jsi/RNWhisperJSI.cpp +1 -0
- package/cpp/whisper.cpp +16 -3
- package/ios/CMakeLists.txt +21 -1
- package/ios/RNWhisperContext.mm +5 -0
- package/ios/rnwhisper.xcframework/ios-arm64/rnwhisper.framework/Headers/ggml-alloc.h +9 -0
- package/ios/rnwhisper.xcframework/ios-arm64/rnwhisper.framework/Headers/ggml-backend-impl.h +1 -1
- package/ios/rnwhisper.xcframework/ios-arm64/rnwhisper.framework/Headers/ggml-backend.h +2 -1
- package/ios/rnwhisper.xcframework/ios-arm64/rnwhisper.framework/Headers/ggml-cpu.h +1 -0
- package/ios/rnwhisper.xcframework/ios-arm64/rnwhisper.framework/Headers/ggml-impl.h +0 -4
- package/ios/rnwhisper.xcframework/ios-arm64/rnwhisper.framework/Headers/ggml.h +51 -12
- package/ios/rnwhisper.xcframework/ios-arm64/rnwhisper.framework/Info.plist +0 -0
- package/ios/rnwhisper.xcframework/ios-arm64/rnwhisper.framework/ggml-metal.metal +404 -34
- package/ios/rnwhisper.xcframework/ios-arm64/rnwhisper.framework/rnwhisper +0 -0
- package/ios/rnwhisper.xcframework/ios-arm64_x86_64-simulator/rnwhisper.framework/Headers/ggml-alloc.h +9 -0
- package/ios/rnwhisper.xcframework/ios-arm64_x86_64-simulator/rnwhisper.framework/Headers/ggml-backend-impl.h +1 -1
- package/ios/rnwhisper.xcframework/ios-arm64_x86_64-simulator/rnwhisper.framework/Headers/ggml-backend.h +2 -1
- package/ios/rnwhisper.xcframework/ios-arm64_x86_64-simulator/rnwhisper.framework/Headers/ggml-cpu.h +1 -0
- package/ios/rnwhisper.xcframework/ios-arm64_x86_64-simulator/rnwhisper.framework/Headers/ggml-impl.h +0 -4
- package/ios/rnwhisper.xcframework/ios-arm64_x86_64-simulator/rnwhisper.framework/Headers/ggml.h +51 -12
- package/ios/rnwhisper.xcframework/ios-arm64_x86_64-simulator/rnwhisper.framework/Info.plist +0 -0
- package/ios/rnwhisper.xcframework/ios-arm64_x86_64-simulator/rnwhisper.framework/_CodeSignature/CodeResources +1 -1
- package/ios/rnwhisper.xcframework/ios-arm64_x86_64-simulator/rnwhisper.framework/ggml-metal.metal +404 -34
- package/ios/rnwhisper.xcframework/ios-arm64_x86_64-simulator/rnwhisper.framework/rnwhisper +0 -0
- package/ios/rnwhisper.xcframework/tvos-arm64/rnwhisper.framework/Headers/ggml-alloc.h +9 -0
- package/ios/rnwhisper.xcframework/tvos-arm64/rnwhisper.framework/Headers/ggml-backend-impl.h +1 -1
- package/ios/rnwhisper.xcframework/tvos-arm64/rnwhisper.framework/Headers/ggml-backend.h +2 -1
- package/ios/rnwhisper.xcframework/tvos-arm64/rnwhisper.framework/Headers/ggml-cpu.h +1 -0
- package/ios/rnwhisper.xcframework/tvos-arm64/rnwhisper.framework/Headers/ggml-impl.h +0 -4
- package/ios/rnwhisper.xcframework/tvos-arm64/rnwhisper.framework/Headers/ggml.h +51 -12
- package/ios/rnwhisper.xcframework/tvos-arm64/rnwhisper.framework/Info.plist +0 -0
- package/ios/rnwhisper.xcframework/tvos-arm64/rnwhisper.framework/ggml-metal.metal +404 -34
- package/ios/rnwhisper.xcframework/tvos-arm64/rnwhisper.framework/rnwhisper +0 -0
- package/ios/rnwhisper.xcframework/tvos-arm64_x86_64-simulator/rnwhisper.framework/Headers/ggml-alloc.h +9 -0
- package/ios/rnwhisper.xcframework/tvos-arm64_x86_64-simulator/rnwhisper.framework/Headers/ggml-backend-impl.h +1 -1
- package/ios/rnwhisper.xcframework/tvos-arm64_x86_64-simulator/rnwhisper.framework/Headers/ggml-backend.h +2 -1
- package/ios/rnwhisper.xcframework/tvos-arm64_x86_64-simulator/rnwhisper.framework/Headers/ggml-cpu.h +1 -0
- package/ios/rnwhisper.xcframework/tvos-arm64_x86_64-simulator/rnwhisper.framework/Headers/ggml-impl.h +0 -4
- package/ios/rnwhisper.xcframework/tvos-arm64_x86_64-simulator/rnwhisper.framework/Headers/ggml.h +51 -12
- package/ios/rnwhisper.xcframework/tvos-arm64_x86_64-simulator/rnwhisper.framework/Info.plist +0 -0
- package/ios/rnwhisper.xcframework/tvos-arm64_x86_64-simulator/rnwhisper.framework/_CodeSignature/CodeResources +1 -1
- package/ios/rnwhisper.xcframework/tvos-arm64_x86_64-simulator/rnwhisper.framework/ggml-metal.metal +404 -34
- package/ios/rnwhisper.xcframework/tvos-arm64_x86_64-simulator/rnwhisper.framework/rnwhisper +0 -0
- package/lib/commonjs/NativeRNWhisper.js.map +1 -1
- package/lib/commonjs/jest-mock.js +2 -0
- package/lib/commonjs/jest-mock.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/NativeRNWhisper.js.map +1 -1
- package/lib/module/jest-mock.js +2 -0
- package/lib/module/jest-mock.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/NativeRNWhisper.d.ts +1 -0
- package/lib/typescript/NativeRNWhisper.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/NativeRNWhisper.ts +1 -0
- package/src/jest-mock.ts +2 -0
- package/src/version.json +1 -1
|
@@ -77,6 +77,8 @@
|
|
|
77
77
|
#define FC_MUL_MV 600
|
|
78
78
|
#define FC_MUL_MM 700
|
|
79
79
|
#define FC_ROPE 800
|
|
80
|
+
#define FC_SSM_CONV 900
|
|
81
|
+
#define FC_COUNT_EQUAL 1000
|
|
80
82
|
|
|
81
83
|
// op-specific constants
|
|
82
84
|
#define OP_FLASH_ATTN_EXT_NQPTG 8
|
|
@@ -182,6 +184,10 @@ typedef struct {
|
|
|
182
184
|
float bias;
|
|
183
185
|
} wsp_ggml_metal_kargs_scale;
|
|
184
186
|
|
|
187
|
+
typedef struct {
|
|
188
|
+
float val;
|
|
189
|
+
} wsp_ggml_metal_kargs_fill;
|
|
190
|
+
|
|
185
191
|
typedef struct {
|
|
186
192
|
float min;
|
|
187
193
|
float max;
|
|
@@ -832,14 +838,38 @@ typedef struct {
|
|
|
832
838
|
} wsp_ggml_metal_kargs_leaky_relu;
|
|
833
839
|
|
|
834
840
|
typedef struct {
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
841
|
+
int32_t ne00;
|
|
842
|
+
int32_t ne01;
|
|
843
|
+
int32_t ne02;
|
|
844
|
+
int32_t ne03;
|
|
845
|
+
uint64_t nb00;
|
|
846
|
+
uint64_t nb01;
|
|
847
|
+
uint64_t nb02;
|
|
848
|
+
uint64_t nb03;
|
|
849
|
+
int32_t ne0;
|
|
850
|
+
int32_t ne1;
|
|
851
|
+
int32_t ne2;
|
|
852
|
+
int32_t ne3;
|
|
853
|
+
uint64_t nb0;
|
|
854
|
+
uint64_t nb1;
|
|
855
|
+
uint64_t nb2;
|
|
856
|
+
uint64_t nb3;
|
|
857
|
+
} wsp_ggml_metal_kargs_tri;
|
|
858
|
+
|
|
859
|
+
typedef struct {
|
|
860
|
+
int32_t ne00;
|
|
861
|
+
int32_t ne01;
|
|
862
|
+
int32_t ne02;
|
|
863
|
+
int32_t ne03;
|
|
839
864
|
uint64_t nb00;
|
|
840
865
|
uint64_t nb01;
|
|
841
866
|
uint64_t nb02;
|
|
842
867
|
uint64_t nb03;
|
|
868
|
+
int32_t ne0;
|
|
869
|
+
int32_t ne1;
|
|
870
|
+
int32_t ne2;
|
|
871
|
+
int32_t ne3;
|
|
872
|
+
int32_t top_k;
|
|
843
873
|
} wsp_ggml_metal_kargs_argsort;
|
|
844
874
|
|
|
845
875
|
typedef struct {
|
|
@@ -851,6 +881,11 @@ typedef struct {
|
|
|
851
881
|
uint64_t nb01;
|
|
852
882
|
uint64_t nb02;
|
|
853
883
|
uint64_t nb03;
|
|
884
|
+
int32_t ne0;
|
|
885
|
+
int32_t ne1;
|
|
886
|
+
int32_t ne2;
|
|
887
|
+
int32_t ne3;
|
|
888
|
+
int32_t top_k;
|
|
854
889
|
int32_t len;
|
|
855
890
|
} wsp_ggml_metal_kargs_argsort_merge;
|
|
856
891
|
|
|
@@ -860,6 +895,25 @@ typedef struct {
|
|
|
860
895
|
float step;
|
|
861
896
|
} wsp_ggml_metal_kargs_arange;
|
|
862
897
|
|
|
898
|
+
typedef struct {
|
|
899
|
+
int64_t val;
|
|
900
|
+
} wsp_ggml_metal_kargs_memset;
|
|
901
|
+
|
|
902
|
+
typedef struct {
|
|
903
|
+
int32_t ne00;
|
|
904
|
+
int32_t ne01;
|
|
905
|
+
int32_t ne02;
|
|
906
|
+
int32_t ne03;
|
|
907
|
+
uint64_t nb00;
|
|
908
|
+
uint64_t nb01;
|
|
909
|
+
uint64_t nb02;
|
|
910
|
+
uint64_t nb03;
|
|
911
|
+
uint64_t nb10;
|
|
912
|
+
uint64_t nb11;
|
|
913
|
+
uint64_t nb12;
|
|
914
|
+
uint64_t nb13;
|
|
915
|
+
} wsp_ggml_metal_kargs_count_equal;
|
|
916
|
+
|
|
863
917
|
typedef struct {
|
|
864
918
|
int32_t k0;
|
|
865
919
|
int32_t k1;
|