Add int8 MLX variant alongside bf16
Browse files- .gitattributes +1 -0
- mlx/config.json +70 -7
- mlx/whisper_tiny_mlx_int8.pte +3 -0
.gitattributes
CHANGED
|
@@ -37,3 +37,4 @@ xnnpack/whisper_tiny_xnnpack.pte filter=lfs diff=lfs merge=lfs -text
|
|
| 37 |
xnnpack/whisper_tiny_xnnpack_fp32.pte filter=lfs diff=lfs merge=lfs -text
|
| 38 |
coreml/whisper_tiny_coreml_fp16.pte filter=lfs diff=lfs merge=lfs -text
|
| 39 |
mlx/whisper_tiny_mlx_bf16.pte filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 37 |
xnnpack/whisper_tiny_xnnpack_fp32.pte filter=lfs diff=lfs merge=lfs -text
|
| 38 |
coreml/whisper_tiny_coreml_fp16.pte filter=lfs diff=lfs merge=lfs -text
|
| 39 |
mlx/whisper_tiny_mlx_bf16.pte filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
mlx/whisper_tiny_mlx_int8.pte filter=lfs diff=lfs merge=lfs -text
|
mlx/config.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
| 1 |
{
|
| 2 |
"$schema": "https://huggingface.co/software-mansion/react-native-executorch-spec/resolve/main/config.schema.json",
|
| 3 |
-
"model": "
|
| 4 |
"family": "whisper",
|
| 5 |
"capabilities": [
|
| 6 |
"speech-to-text"
|
| 7 |
],
|
| 8 |
"backend": "mlx",
|
| 9 |
-
"license": "
|
| 10 |
"tokenizer": "../tokenizer.json",
|
| 11 |
"variants": [
|
| 12 |
{
|
|
@@ -15,18 +15,38 @@
|
|
| 15 |
"quantized": false,
|
| 16 |
"default": true,
|
| 17 |
"methods": {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
"decode": {
|
| 19 |
"inputs": [
|
| 20 |
{
|
| 21 |
"shape": [
|
| 22 |
1,
|
| 23 |
-
|
| 24 |
],
|
| 25 |
"dtype": "int64"
|
| 26 |
},
|
| 27 |
{
|
| 28 |
"shape": [
|
| 29 |
-
|
| 30 |
],
|
| 31 |
"dtype": "int64"
|
| 32 |
},
|
|
@@ -43,13 +63,21 @@
|
|
| 43 |
{
|
| 44 |
"shape": [
|
| 45 |
1,
|
| 46 |
-
|
| 47 |
51865
|
| 48 |
],
|
| 49 |
"dtype": "float32"
|
| 50 |
}
|
| 51 |
]
|
| 52 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
"encode": {
|
| 54 |
"inputs": [
|
| 55 |
{
|
|
@@ -69,8 +97,43 @@
|
|
| 69 |
"dtype": "float32"
|
| 70 |
}
|
| 71 |
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
}
|
| 73 |
}
|
| 74 |
}
|
| 75 |
]
|
| 76 |
-
}
|
|
|
|
| 1 |
{
|
| 2 |
"$schema": "https://huggingface.co/software-mansion/react-native-executorch-spec/resolve/main/config.schema.json",
|
| 3 |
+
"model": "whisper",
|
| 4 |
"family": "whisper",
|
| 5 |
"capabilities": [
|
| 6 |
"speech-to-text"
|
| 7 |
],
|
| 8 |
"backend": "mlx",
|
| 9 |
+
"license": "mit",
|
| 10 |
"tokenizer": "../tokenizer.json",
|
| 11 |
"variants": [
|
| 12 |
{
|
|
|
|
| 15 |
"quantized": false,
|
| 16 |
"default": true,
|
| 17 |
"methods": {
|
| 18 |
+
"encode": {
|
| 19 |
+
"inputs": [
|
| 20 |
+
{
|
| 21 |
+
"shape": [
|
| 22 |
+
480000
|
| 23 |
+
],
|
| 24 |
+
"dtype": "float32"
|
| 25 |
+
}
|
| 26 |
+
],
|
| 27 |
+
"outputs": [
|
| 28 |
+
{
|
| 29 |
+
"shape": [
|
| 30 |
+
1,
|
| 31 |
+
1500,
|
| 32 |
+
384
|
| 33 |
+
],
|
| 34 |
+
"dtype": "float32"
|
| 35 |
+
}
|
| 36 |
+
]
|
| 37 |
+
},
|
| 38 |
"decode": {
|
| 39 |
"inputs": [
|
| 40 |
{
|
| 41 |
"shape": [
|
| 42 |
1,
|
| 43 |
+
1
|
| 44 |
],
|
| 45 |
"dtype": "int64"
|
| 46 |
},
|
| 47 |
{
|
| 48 |
"shape": [
|
| 49 |
+
1
|
| 50 |
],
|
| 51 |
"dtype": "int64"
|
| 52 |
},
|
|
|
|
| 63 |
{
|
| 64 |
"shape": [
|
| 65 |
1,
|
| 66 |
+
1,
|
| 67 |
51865
|
| 68 |
],
|
| 69 |
"dtype": "float32"
|
| 70 |
}
|
| 71 |
]
|
| 72 |
+
}
|
| 73 |
+
}
|
| 74 |
+
},
|
| 75 |
+
{
|
| 76 |
+
"file": "whisper_tiny_mlx_int8.pte",
|
| 77 |
+
"precision": "int8",
|
| 78 |
+
"quantized": true,
|
| 79 |
+
"default": false,
|
| 80 |
+
"methods": {
|
| 81 |
"encode": {
|
| 82 |
"inputs": [
|
| 83 |
{
|
|
|
|
| 97 |
"dtype": "float32"
|
| 98 |
}
|
| 99 |
]
|
| 100 |
+
},
|
| 101 |
+
"decode": {
|
| 102 |
+
"inputs": [
|
| 103 |
+
{
|
| 104 |
+
"shape": [
|
| 105 |
+
1,
|
| 106 |
+
1
|
| 107 |
+
],
|
| 108 |
+
"dtype": "int64"
|
| 109 |
+
},
|
| 110 |
+
{
|
| 111 |
+
"shape": [
|
| 112 |
+
1
|
| 113 |
+
],
|
| 114 |
+
"dtype": "int64"
|
| 115 |
+
},
|
| 116 |
+
{
|
| 117 |
+
"shape": [
|
| 118 |
+
1,
|
| 119 |
+
1500,
|
| 120 |
+
384
|
| 121 |
+
],
|
| 122 |
+
"dtype": "float32"
|
| 123 |
+
}
|
| 124 |
+
],
|
| 125 |
+
"outputs": [
|
| 126 |
+
{
|
| 127 |
+
"shape": [
|
| 128 |
+
1,
|
| 129 |
+
1,
|
| 130 |
+
51865
|
| 131 |
+
],
|
| 132 |
+
"dtype": "float32"
|
| 133 |
+
}
|
| 134 |
+
]
|
| 135 |
}
|
| 136 |
}
|
| 137 |
}
|
| 138 |
]
|
| 139 |
+
}
|
mlx/whisper_tiny_mlx_int8.pte
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ce7945ecce2eebde1645f3e1d98a6fdddeccc5e02afbbf961c0806bd62f59569
|
| 3 |
+
size 59889792
|