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

Add XNNPACK int8 exports

Browse files
README.md CHANGED
@@ -14,15 +14,31 @@ Upstream model: [clip-vit-base-patch32](https://huggingface.co/openai/clip-vit-b
14
 
15
  ## Variants
16
 
17
- | Path | Component | Backend | Precision |
18
- | --- | --- | --- | --- |
19
- | `coreml/clip_vit_base_patch32_image_coreml_fp16.pte` | image | coreml | fp16 |
20
- | `coreml/clip_vit_base_patch32_text_coreml_fp16.pte` | text | coreml | fp16 |
21
- | `mlx/clip_vit_base_patch32_image_mlx_int8.pte` | - | mlx | int8 |
22
- | `vulkan/clip_vit_base_patch32_image_vulkan_fp16.pte` | image | vulkan | fp16 |
23
- | `vulkan/clip_vit_base_patch32_text_vulkan_fp16.pte` | text | vulkan | fp16 |
24
- | `xnnpack/clip_vit_base_patch32_image_xnnpack_fp32.pte` | image | xnnpack | fp32 |
25
- | `xnnpack/clip_vit_base_patch32_text_xnnpack_fp32.pte` | text | xnnpack | fp32 |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
 
27
  ## Repository structure
28
 
@@ -30,6 +46,7 @@ Upstream model: [clip-vit-base-patch32](https://huggingface.co/openai/clip-vit-b
30
  config.json 43 B
31
  coreml/clip_vit_base_patch32_image_coreml_fp16.pte 168 MB
32
  coreml/clip_vit_base_patch32_text_coreml_fp16.pte 122 MB
 
33
  coreml/config.json 1.7 kB
34
  mlx/clip_vit_base_patch32_image_mlx_int8.pte 93.7 MB
35
  mlx/config.json 840 B
@@ -38,8 +55,10 @@ vulkan/clip_vit_base_patch32_image_vulkan_fp16.pte 168 MB
38
  vulkan/clip_vit_base_patch32_text_vulkan_fp16.pte 121 MB
39
  vulkan/config.json 1.7 kB
40
  xnnpack/clip_vit_base_patch32_image_xnnpack_fp32.pte 335 MB
 
41
  xnnpack/clip_vit_base_patch32_text_xnnpack_fp32.pte 242 MB
42
- xnnpack/config.json 1.6 kB
 
43
  ```
44
 
45
  ## Compatibility
 
14
 
15
  ## Variants
16
 
17
+ | Path | Backend | Precision |
18
+ | --- | --- | --- |
19
+ | `coreml/clip_vit_base_patch32_image_coreml_fp16.pte` | coreml | fp16 |
20
+ | `coreml/clip_vit_base_patch32_text_coreml_fp16.pte` | coreml | fp16 |
21
+ | `coreml/clip_vit_base_patch32_text_coreml_int8.pte` | coreml | int8 |
22
+ | `mlx/clip_vit_base_patch32_image_mlx_int8.pte` | mlx | int8 |
23
+ | `vulkan/clip_vit_base_patch32_image_vulkan_fp16.pte` | vulkan | fp16 |
24
+ | `vulkan/clip_vit_base_patch32_text_vulkan_fp16.pte` | vulkan | fp16 |
25
+ | `xnnpack/clip_vit_base_patch32_image_xnnpack_fp32.pte` | xnnpack | fp32 |
26
+ | `xnnpack/clip_vit_base_patch32_image_xnnpack_int8.pte` | xnnpack | int8 |
27
+ | `xnnpack/clip_vit_base_patch32_text_xnnpack_fp32.pte` | xnnpack | fp32 |
28
+ | `xnnpack/clip_vit_base_patch32_text_xnnpack_int8.pte` | xnnpack | int8 |
29
+
30
+ ## XNNPACK int8
31
+
32
+ The `xnnpack/*_int8.pte` towers are 8da8w (int8 dynamic activations, int8 per-channel
33
+ weights) on the Linear layers; the text tower also has an int8 token embedding table.
34
+ ImageNetV2 zero-shot top-1 (1000 images, one per class, "a photo of a {class}."):
35
+
36
+ | image | text | top-1 |
37
+ | --- | --- | --- |
38
+ | fp32 | fp32 | 51.4 |
39
+ | int8 | fp32 | 51.5 |
40
+ | fp32 | int8 | 51.2 |
41
+ | int8 | int8 | 51.3 |
42
 
43
  ## Repository structure
44
 
 
46
  config.json 43 B
47
  coreml/clip_vit_base_patch32_image_coreml_fp16.pte 168 MB
48
  coreml/clip_vit_base_patch32_text_coreml_fp16.pte 122 MB
49
+ coreml/clip_vit_base_patch32_text_coreml_int8.pte 61.0 MB
50
  coreml/config.json 1.7 kB
51
  mlx/clip_vit_base_patch32_image_mlx_int8.pte 93.7 MB
52
  mlx/config.json 840 B
 
55
  vulkan/clip_vit_base_patch32_text_vulkan_fp16.pte 121 MB
56
  vulkan/config.json 1.7 kB
57
  xnnpack/clip_vit_base_patch32_image_xnnpack_fp32.pte 335 MB
58
+ xnnpack/clip_vit_base_patch32_image_xnnpack_int8.pte 91.5 MB
59
  xnnpack/clip_vit_base_patch32_text_xnnpack_fp32.pte 242 MB
60
+ xnnpack/clip_vit_base_patch32_text_xnnpack_int8.pte 61.4 MB
61
+ xnnpack/config.json 2.9 kB
62
  ```
63
 
64
  ## Compatibility
xnnpack/clip_vit_base_patch32_image_xnnpack_int8.pte ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4bc4c3a737813a065f17e5a271443cafd667898b50c558b82df08cc85275a84f
3
+ size 95947264
xnnpack/clip_vit_base_patch32_text_xnnpack_int8.pte ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d770290b59fda3c653e0b00f56bfc1705dd42c77f44f943b49b4fcb1ae2d0bc4
3
+ size 64353408
xnnpack/config.json CHANGED
@@ -71,6 +71,69 @@
71
  "image": "clip_vit_base_patch32_image_xnnpack_fp32.pte",
72
  "text": "clip_vit_base_patch32_text_xnnpack_fp32.pte"
73
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  }
75
  ]
76
  }
 
71
  "image": "clip_vit_base_patch32_image_xnnpack_fp32.pte",
72
  "text": "clip_vit_base_patch32_text_xnnpack_fp32.pte"
73
  }
74
+ },
75
+ {
76
+ "file": null,
77
+ "precision": "int8",
78
+ "methods": {
79
+ "image": {
80
+ "forward": {
81
+ "inputs": [
82
+ {
83
+ "shape": [
84
+ 1,
85
+ 3,
86
+ 224,
87
+ 224
88
+ ],
89
+ "dtype": "float32"
90
+ }
91
+ ],
92
+ "outputs": [
93
+ {
94
+ "shape": [
95
+ 1,
96
+ 512
97
+ ],
98
+ "dtype": "float32"
99
+ }
100
+ ]
101
+ }
102
+ },
103
+ "text": {
104
+ "forward": {
105
+ "inputs": [
106
+ {
107
+ "shape": [
108
+ 1,
109
+ 74
110
+ ],
111
+ "dtype": "int64"
112
+ },
113
+ {
114
+ "shape": [
115
+ 1,
116
+ 74
117
+ ],
118
+ "dtype": "int64"
119
+ }
120
+ ],
121
+ "outputs": [
122
+ {
123
+ "shape": [
124
+ 1,
125
+ 512
126
+ ],
127
+ "dtype": "float32"
128
+ }
129
+ ]
130
+ }
131
+ }
132
+ },
133
+ "components": {
134
+ "image": "clip_vit_base_patch32_image_xnnpack_int8.pte",
135
+ "text": "clip_vit_base_patch32_text_xnnpack_int8.pte"
136
+ }
137
  }
138
  ]
139
  }