MLX int8 image tower; drop MLX fp32 and XNNPACK int8
Browse files
mlx/clip_vit_base_patch32_image_mlx_fp32.pte
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:544e0741019d4384b96f32dffd9289a73f5297c8c8d9c0cd12de7976f5bb194e
|
| 3 |
-
size 351466756
|
|
|
|
|
|
|
|
|
|
|
|
xnnpack/clip_vit_base_patch32_image_xnnpack_int8.pte → mlx/clip_vit_base_patch32_image_mlx_int8.pte
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:59d414d32f5cd191556bca3eaea222d1e37dd287babfd43f69626f8d34b9e0f1
|
| 3 |
+
size 98200964
|
mlx/config.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"$schema": "https://huggingface.co/software-mansion/react-native-executorch-spec/resolve/main/config.schema.json",
|
| 3 |
+
"model": "clip_vit_base_patch32_vision",
|
| 4 |
+
"family": "clip",
|
| 5 |
+
"capabilities": [
|
| 6 |
+
"image-embedding"
|
| 7 |
+
],
|
| 8 |
+
"backend": "mlx",
|
| 9 |
+
"license": "mit",
|
| 10 |
+
"variants": [
|
| 11 |
+
{
|
| 12 |
+
"file": "clip_vit_base_patch32_image_mlx_int8.pte",
|
| 13 |
+
"precision": "int8",
|
| 14 |
+
"quantized": true,
|
| 15 |
+
"default": true,
|
| 16 |
+
"methods": {
|
| 17 |
+
"forward": {
|
| 18 |
+
"inputs": [
|
| 19 |
+
{
|
| 20 |
+
"shape": [
|
| 21 |
+
1,
|
| 22 |
+
3,
|
| 23 |
+
224,
|
| 24 |
+
224
|
| 25 |
+
],
|
| 26 |
+
"dtype": "float32"
|
| 27 |
+
}
|
| 28 |
+
],
|
| 29 |
+
"outputs": [
|
| 30 |
+
{
|
| 31 |
+
"shape": [
|
| 32 |
+
1,
|
| 33 |
+
512
|
| 34 |
+
],
|
| 35 |
+
"dtype": "float32"
|
| 36 |
+
}
|
| 37 |
+
]
|
| 38 |
+
}
|
| 39 |
+
}
|
| 40 |
+
}
|
| 41 |
+
]
|
| 42 |
+
}
|
xnnpack/config.json
CHANGED
|
@@ -1,26 +1,20 @@
|
|
| 1 |
{
|
| 2 |
"$schema": "https://huggingface.co/software-mansion/react-native-executorch-spec/resolve/main/config.schema.json",
|
| 3 |
-
"model": "
|
| 4 |
"family": "clip",
|
| 5 |
"capabilities": [
|
| 6 |
-
"text-embedding",
|
| 7 |
"image-embedding"
|
| 8 |
],
|
| 9 |
"backend": "xnnpack",
|
| 10 |
"license": "mit",
|
| 11 |
-
"tokenizer": "../tokenizer.json",
|
| 12 |
"variants": [
|
| 13 |
{
|
| 14 |
-
"file":
|
| 15 |
-
"components": {
|
| 16 |
-
"image": "clip_vit_base_patch32_image_xnnpack_fp32.pte",
|
| 17 |
-
"text": "clip_vit_base_patch32_text_xnnpack_fp32.pte"
|
| 18 |
-
},
|
| 19 |
"precision": "fp32",
|
| 20 |
"quantized": false,
|
| 21 |
"default": true,
|
| 22 |
"methods": {
|
| 23 |
-
"
|
| 24 |
"inputs": [
|
| 25 |
{
|
| 26 |
"shape": [
|
|
@@ -41,82 +35,8 @@
|
|
| 41 |
"dtype": "float32"
|
| 42 |
}
|
| 43 |
]
|
| 44 |
-
},
|
| 45 |
-
"text": {
|
| 46 |
-
"inputs": [
|
| 47 |
-
{
|
| 48 |
-
"shape": [
|
| 49 |
-
1,
|
| 50 |
-
77
|
| 51 |
-
],
|
| 52 |
-
"dtype": "int64"
|
| 53 |
-
}
|
| 54 |
-
],
|
| 55 |
-
"outputs": [
|
| 56 |
-
{
|
| 57 |
-
"shape": [
|
| 58 |
-
1,
|
| 59 |
-
512
|
| 60 |
-
],
|
| 61 |
-
"dtype": "float32"
|
| 62 |
-
}
|
| 63 |
-
]
|
| 64 |
-
}
|
| 65 |
-
}
|
| 66 |
-
},
|
| 67 |
-
{
|
| 68 |
-
"file": null,
|
| 69 |
-
"components": {
|
| 70 |
-
"image": "clip_vit_base_patch32_image_xnnpack_int8.pte",
|
| 71 |
-
"text": "clip_vit_base_patch32_text_xnnpack_fp32.pte"
|
| 72 |
-
},
|
| 73 |
-
"precision": "int8",
|
| 74 |
-
"quantized": true,
|
| 75 |
-
"default": true,
|
| 76 |
-
"methods": {
|
| 77 |
-
"image": {
|
| 78 |
-
"inputs": [
|
| 79 |
-
{
|
| 80 |
-
"shape": [
|
| 81 |
-
1,
|
| 82 |
-
3,
|
| 83 |
-
224,
|
| 84 |
-
224
|
| 85 |
-
],
|
| 86 |
-
"dtype": "float32"
|
| 87 |
-
}
|
| 88 |
-
],
|
| 89 |
-
"outputs": [
|
| 90 |
-
{
|
| 91 |
-
"shape": [
|
| 92 |
-
1,
|
| 93 |
-
512
|
| 94 |
-
],
|
| 95 |
-
"dtype": "float32"
|
| 96 |
-
}
|
| 97 |
-
]
|
| 98 |
-
},
|
| 99 |
-
"text": {
|
| 100 |
-
"inputs": [
|
| 101 |
-
{
|
| 102 |
-
"shape": [
|
| 103 |
-
1,
|
| 104 |
-
77
|
| 105 |
-
],
|
| 106 |
-
"dtype": "int64"
|
| 107 |
-
}
|
| 108 |
-
],
|
| 109 |
-
"outputs": [
|
| 110 |
-
{
|
| 111 |
-
"shape": [
|
| 112 |
-
1,
|
| 113 |
-
512
|
| 114 |
-
],
|
| 115 |
-
"dtype": "float32"
|
| 116 |
-
}
|
| 117 |
-
]
|
| 118 |
}
|
| 119 |
}
|
| 120 |
}
|
| 121 |
]
|
| 122 |
-
}
|
|
|
|
| 1 |
{
|
| 2 |
"$schema": "https://huggingface.co/software-mansion/react-native-executorch-spec/resolve/main/config.schema.json",
|
| 3 |
+
"model": "clip_vit_base_patch32_vision",
|
| 4 |
"family": "clip",
|
| 5 |
"capabilities": [
|
|
|
|
| 6 |
"image-embedding"
|
| 7 |
],
|
| 8 |
"backend": "xnnpack",
|
| 9 |
"license": "mit",
|
|
|
|
| 10 |
"variants": [
|
| 11 |
{
|
| 12 |
+
"file": "clip_vit_base_patch32_image_xnnpack_fp32.pte",
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
"precision": "fp32",
|
| 14 |
"quantized": false,
|
| 15 |
"default": true,
|
| 16 |
"methods": {
|
| 17 |
+
"forward": {
|
| 18 |
"inputs": [
|
| 19 |
{
|
| 20 |
"shape": [
|
|
|
|
| 35 |
"dtype": "float32"
|
| 36 |
}
|
| 37 |
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
}
|
| 39 |
}
|
| 40 |
}
|
| 41 |
]
|
| 42 |
+
}
|