msluszniak commited on
Commit
ab63eeb
·
verified ·
1 Parent(s): 9389d33

Add int8 MLX variant; remove bf16 (OOM-killed on device)

Browse files
.gitattributes CHANGED
@@ -37,3 +37,4 @@ xnnpack/whisper_small_xnnpack.pte filter=lfs diff=lfs merge=lfs -text
37
  xnnpack/whisper_small_xnnpack_fp32.pte filter=lfs diff=lfs merge=lfs -text
38
  coreml/whisper_small_coreml_fp16.pte filter=lfs diff=lfs merge=lfs -text
39
  mlx/whisper_small_mlx_bf16.pte filter=lfs diff=lfs merge=lfs -text
 
 
37
  xnnpack/whisper_small_xnnpack_fp32.pte filter=lfs diff=lfs merge=lfs -text
38
  coreml/whisper_small_coreml_fp16.pte filter=lfs diff=lfs merge=lfs -text
39
  mlx/whisper_small_mlx_bf16.pte filter=lfs diff=lfs merge=lfs -text
40
+ mlx/whisper_small_mlx_int8.pte filter=lfs diff=lfs merge=lfs -text
mlx/config.json CHANGED
@@ -1,40 +1,25 @@
1
  {
2
  "$schema": "https://huggingface.co/software-mansion/react-native-executorch-spec/resolve/main/config.schema.json",
3
- "model": "whisper_small",
4
  "family": "whisper",
5
  "capabilities": [
6
  "speech-to-text"
7
  ],
8
- "backend": "coreml",
9
- "license": "apache-2.0",
10
  "tokenizer": "../tokenizer.json",
11
  "variants": [
12
  {
13
- "file": "whisper_small_mlx_bf16.pte",
14
- "precision": "bf16",
15
- "quantized": false,
16
  "default": true,
17
  "methods": {
18
- "decode": {
19
  "inputs": [
20
  {
21
  "shape": [
22
- 1,
23
- 128
24
- ],
25
- "dtype": "int64"
26
- },
27
- {
28
- "shape": [
29
- 128
30
- ],
31
- "dtype": "int64"
32
- },
33
- {
34
- "shape": [
35
- 1,
36
- 1500,
37
- 768
38
  ],
39
  "dtype": "float32"
40
  }
@@ -43,18 +28,33 @@
43
  {
44
  "shape": [
45
  1,
46
- 128,
47
- 51865
48
  ],
49
  "dtype": "float32"
50
  }
51
  ]
52
  },
53
- "encode": {
54
  "inputs": [
55
  {
56
  "shape": [
57
- 480000
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  ],
59
  "dtype": "float32"
60
  }
@@ -63,8 +63,8 @@
63
  {
64
  "shape": [
65
  1,
66
- 1500,
67
- 768
68
  ],
69
  "dtype": "float32"
70
  }
@@ -73,4 +73,4 @@
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
  {
13
+ "file": "whisper_small_mlx_int8.pte",
14
+ "precision": "int8",
15
+ "quantized": true,
16
  "default": true,
17
  "methods": {
18
+ "encode": {
19
  "inputs": [
20
  {
21
  "shape": [
22
+ 480000
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  ],
24
  "dtype": "float32"
25
  }
 
28
  {
29
  "shape": [
30
  1,
31
+ 1500,
32
+ 768
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
+ },
53
+ {
54
+ "shape": [
55
+ 1,
56
+ 1500,
57
+ 768
58
  ],
59
  "dtype": "float32"
60
  }
 
63
  {
64
  "shape": [
65
  1,
66
+ 1,
67
+ 51865
68
  ],
69
  "dtype": "float32"
70
  }
 
73
  }
74
  }
75
  ]
76
+ }
mlx/{whisper_small_mlx_bf16.pte → whisper_small_mlx_int8.pte} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:7c51f14b5dd3f204f1e3a8aa4c4bcfe24a4ce490bc6512aaab85b462db0eaeee
3
- size 484420096
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0454d8f29289de86f8016b165a89bd3307e5e5437e854216c6ae35f8a94fa273
3
+ size 289455744