msluszniak commited on
Commit
895dc7e
·
verified ·
1 Parent(s): 9f97e32

Declare the int8 Core ML variant

Browse files
Files changed (1) hide show
  1. coreml/config.json +66 -60
coreml/config.json CHANGED
@@ -1,75 +1,81 @@
1
  {
2
  "$schema": "https://huggingface.co/software-mansion/react-native-executorch-spec/resolve/main/config.schema.json",
3
- "model": "clip_vit_base_patch32",
4
  "family": "clip",
5
  "capabilities": [
6
- "text-embedding",
7
- "image-embedding"
8
  ],
9
  "backend": "coreml",
10
  "license": "mit",
11
- "tokenizer": "../tokenizer.json",
12
  "variants": [
13
  {
14
- "file": null,
15
- "components": {
16
- "image": "clip_vit_base_patch32_image_coreml_fp16.pte",
17
- "text": "clip_vit_base_patch32_text_coreml_fp16.pte"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  },
 
 
 
 
19
  "precision": "fp16",
 
 
20
  "methods": {
21
- "image": {
22
- "forward": {
23
- "inputs": [
24
- {
25
- "shape": [
26
- 1,
27
- 3,
28
- 224,
29
- 224
30
- ],
31
- "dtype": "float32"
32
- }
33
- ],
34
- "outputs": [
35
- {
36
- "shape": [
37
- 1,
38
- 512
39
- ],
40
- "dtype": "float32"
41
- }
42
- ]
43
- }
44
- },
45
- "text": {
46
- "forward": {
47
- "inputs": [
48
- {
49
- "shape": [
50
- 1,
51
- 74
52
- ],
53
- "dtype": "int64"
54
- },
55
- {
56
- "shape": [
57
- 1,
58
- 74
59
- ],
60
- "dtype": "int64"
61
- }
62
- ],
63
- "outputs": [
64
- {
65
- "shape": [
66
- 1,
67
- 512
68
- ],
69
- "dtype": "float32"
70
- }
71
- ]
72
- }
73
  }
74
  }
75
  }
 
1
  {
2
  "$schema": "https://huggingface.co/software-mansion/react-native-executorch-spec/resolve/main/config.schema.json",
3
+ "model": "clip_vit_base_patch32_text",
4
  "family": "clip",
5
  "capabilities": [
6
+ "text-embedding"
 
7
  ],
8
  "backend": "coreml",
9
  "license": "mit",
 
10
  "variants": [
11
  {
12
+ "file": "clip_vit_base_patch32_text_coreml_int8.pte",
13
+ "precision": "int8",
14
+ "quantized": true,
15
+ "default": true,
16
+ "methods": {
17
+ "forward": {
18
+ "inputs": [
19
+ {
20
+ "shape": [
21
+ 1,
22
+ 74
23
+ ],
24
+ "dtype": "int64"
25
+ },
26
+ {
27
+ "shape": [
28
+ 1,
29
+ 74
30
+ ],
31
+ "dtype": "int64"
32
+ }
33
+ ],
34
+ "outputs": [
35
+ {
36
+ "shape": [
37
+ 1,
38
+ 512
39
+ ],
40
+ "dtype": "float32"
41
+ }
42
+ ]
43
+ }
44
  },
45
+ "quantize": "int8"
46
+ },
47
+ {
48
+ "file": "clip_vit_base_patch32_text_coreml_fp16.pte",
49
  "precision": "fp16",
50
+ "quantized": false,
51
+ "default": true,
52
  "methods": {
53
+ "forward": {
54
+ "inputs": [
55
+ {
56
+ "shape": [
57
+ 1,
58
+ 74
59
+ ],
60
+ "dtype": "int64"
61
+ },
62
+ {
63
+ "shape": [
64
+ 1,
65
+ 74
66
+ ],
67
+ "dtype": "int64"
68
+ }
69
+ ],
70
+ "outputs": [
71
+ {
72
+ "shape": [
73
+ 1,
74
+ 512
75
+ ],
76
+ "dtype": "float32"
77
+ }
78
+ ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  }
80
  }
81
  }