Add XNNPACK int8 exports
Browse files- README.md +26 -2
- s/xnnpack/config.json +47 -0
- s/xnnpack/fast_sam_s_xnnpack_int8.pte +3 -0
- x/xnnpack/config.json +47 -0
- x/xnnpack/fast_sam_x_xnnpack_int8.pte +3 -0
README.md
CHANGED
|
@@ -17,9 +17,27 @@ Upstream model: [FastSAM](https://docs.ultralytics.com/models/fast-sam/)
|
|
| 17 |
| Path | Backend | Precision |
|
| 18 |
| --- | --- | --- |
|
| 19 |
| `s/coreml/fast_sam_s_coreml_fp16.pte` | coreml | fp16 |
|
|
|
|
| 20 |
| `s/xnnpack/fast_sam_s_xnnpack_fp32.pte` | xnnpack | fp32 |
|
|
|
|
| 21 |
| `x/coreml/fast_sam_x_coreml_fp16.pte` | coreml | fp16 |
|
|
|
|
| 22 |
| `x/xnnpack/fast_sam_x_xnnpack_fp32.pte` | xnnpack | fp32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
## Unshipped backends
|
| 25 |
|
|
@@ -36,13 +54,19 @@ config.json 30 B
|
|
| 36 |
s/coreml/config.json 1.2 kB
|
| 37 |
s/coreml/fast_sam_s_coreml_fp16.pte 23.1 MB
|
| 38 |
s/mlx/NOTES.md 2.0 kB
|
| 39 |
-
s/
|
|
|
|
|
|
|
| 40 |
s/xnnpack/fast_sam_s_xnnpack_fp32.pte 45.2 MB
|
|
|
|
| 41 |
x/coreml/config.json 1.2 kB
|
| 42 |
x/coreml/fast_sam_x_coreml_fp16.pte 139 MB
|
| 43 |
x/mlx/NOTES.md 2.0 kB
|
| 44 |
-
x/
|
|
|
|
|
|
|
| 45 |
x/xnnpack/fast_sam_x_xnnpack_fp32.pte 276 MB
|
|
|
|
| 46 |
```
|
| 47 |
|
| 48 |
## Compatibility
|
|
|
|
| 17 |
| Path | Backend | Precision |
|
| 18 |
| --- | --- | --- |
|
| 19 |
| `s/coreml/fast_sam_s_coreml_fp16.pte` | coreml | fp16 |
|
| 20 |
+
| `s/vulkan/fast_sam_s_vulkan_fp16.pte` | vulkan | fp16 |
|
| 21 |
| `s/xnnpack/fast_sam_s_xnnpack_fp32.pte` | xnnpack | fp32 |
|
| 22 |
+
| `s/xnnpack/fast_sam_s_xnnpack_int8.pte` | xnnpack | int8 |
|
| 23 |
| `x/coreml/fast_sam_x_coreml_fp16.pte` | coreml | fp16 |
|
| 24 |
+
| `x/vulkan/fast_sam_x_vulkan_fp16.pte` | vulkan | fp16 |
|
| 25 |
| `x/xnnpack/fast_sam_x_xnnpack_fp32.pte` | xnnpack | fp32 |
|
| 26 |
+
| `x/xnnpack/fast_sam_x_xnnpack_int8.pte` | xnnpack | int8 |
|
| 27 |
+
|
| 28 |
+
## XNNPACK int8
|
| 29 |
+
|
| 30 |
+
The `xnnpack/*_int8.pte` files are static int8 (PT2E, per-channel weights) with the
|
| 31 |
+
first convolution and the Segment head kept fp32, except the mask prototype branch.
|
| 32 |
+
Class-agnostic COCO AR@100 on the first 500 val2017 images (all categories merged,
|
| 33 |
+
box NMS at IoU 0.9 as in the library):
|
| 34 |
+
|
| 35 |
+
| | box AR@100 | mask AR@100 |
|
| 36 |
+
| --- | --- | --- |
|
| 37 |
+
| s fp32 | 41.65 | 36.25 |
|
| 38 |
+
| s int8 | 41.81 | 36.13 |
|
| 39 |
+
| x fp32 | 46.07 | 40.93 |
|
| 40 |
+
| x int8 | 46.09 | 41.04 |
|
| 41 |
|
| 42 |
## Unshipped backends
|
| 43 |
|
|
|
|
| 54 |
s/coreml/config.json 1.2 kB
|
| 55 |
s/coreml/fast_sam_s_coreml_fp16.pte 23.1 MB
|
| 56 |
s/mlx/NOTES.md 2.0 kB
|
| 57 |
+
s/vulkan/config.json 1.3 kB
|
| 58 |
+
s/vulkan/fast_sam_s_vulkan_fp16.pte 22.6 MB
|
| 59 |
+
s/xnnpack/config.json 2.1 kB
|
| 60 |
s/xnnpack/fast_sam_s_xnnpack_fp32.pte 45.2 MB
|
| 61 |
+
s/xnnpack/fast_sam_s_xnnpack_int8.pte 18.5 MB
|
| 62 |
x/coreml/config.json 1.2 kB
|
| 63 |
x/coreml/fast_sam_x_coreml_fp16.pte 139 MB
|
| 64 |
x/mlx/NOTES.md 2.0 kB
|
| 65 |
+
x/vulkan/config.json 1.3 kB
|
| 66 |
+
x/vulkan/fast_sam_x_vulkan_fp16.pte 138 MB
|
| 67 |
+
x/xnnpack/config.json 2.1 kB
|
| 68 |
x/xnnpack/fast_sam_x_xnnpack_fp32.pte 276 MB
|
| 69 |
+
x/xnnpack/fast_sam_x_xnnpack_int8.pte 99.6 MB
|
| 70 |
```
|
| 71 |
|
| 72 |
## Compatibility
|
s/xnnpack/config.json
CHANGED
|
@@ -55,6 +55,53 @@
|
|
| 55 |
]
|
| 56 |
}
|
| 57 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
}
|
| 59 |
]
|
| 60 |
}
|
|
|
|
| 55 |
]
|
| 56 |
}
|
| 57 |
}
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
"file": "fast_sam_s_xnnpack_int8.pte",
|
| 61 |
+
"precision": "int8",
|
| 62 |
+
"size": "s",
|
| 63 |
+
"methods": {
|
| 64 |
+
"forward": {
|
| 65 |
+
"inputs": [
|
| 66 |
+
{
|
| 67 |
+
"shape": [
|
| 68 |
+
1,
|
| 69 |
+
3,
|
| 70 |
+
640,
|
| 71 |
+
640
|
| 72 |
+
],
|
| 73 |
+
"dtype": "float32"
|
| 74 |
+
}
|
| 75 |
+
],
|
| 76 |
+
"outputs": [
|
| 77 |
+
{
|
| 78 |
+
"shape": [
|
| 79 |
+
1,
|
| 80 |
+
300,
|
| 81 |
+
4
|
| 82 |
+
],
|
| 83 |
+
"dtype": "float32"
|
| 84 |
+
},
|
| 85 |
+
{
|
| 86 |
+
"shape": [
|
| 87 |
+
1,
|
| 88 |
+
300,
|
| 89 |
+
32
|
| 90 |
+
],
|
| 91 |
+
"dtype": "float32"
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"shape": [
|
| 95 |
+
1,
|
| 96 |
+
32,
|
| 97 |
+
160,
|
| 98 |
+
160
|
| 99 |
+
],
|
| 100 |
+
"dtype": "float32"
|
| 101 |
+
}
|
| 102 |
+
]
|
| 103 |
+
}
|
| 104 |
+
}
|
| 105 |
}
|
| 106 |
]
|
| 107 |
}
|
s/xnnpack/fast_sam_s_xnnpack_int8.pte
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7fab58acb6d29c6e310528e3c81c7eff51ae93dcf12ebf32578b73a591358e89
|
| 3 |
+
size 19346816
|
x/xnnpack/config.json
CHANGED
|
@@ -55,6 +55,53 @@
|
|
| 55 |
]
|
| 56 |
}
|
| 57 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
}
|
| 59 |
]
|
| 60 |
}
|
|
|
|
| 55 |
]
|
| 56 |
}
|
| 57 |
}
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
"file": "fast_sam_x_xnnpack_int8.pte",
|
| 61 |
+
"precision": "int8",
|
| 62 |
+
"size": "x",
|
| 63 |
+
"methods": {
|
| 64 |
+
"forward": {
|
| 65 |
+
"inputs": [
|
| 66 |
+
{
|
| 67 |
+
"shape": [
|
| 68 |
+
1,
|
| 69 |
+
3,
|
| 70 |
+
640,
|
| 71 |
+
640
|
| 72 |
+
],
|
| 73 |
+
"dtype": "float32"
|
| 74 |
+
}
|
| 75 |
+
],
|
| 76 |
+
"outputs": [
|
| 77 |
+
{
|
| 78 |
+
"shape": [
|
| 79 |
+
1,
|
| 80 |
+
300,
|
| 81 |
+
4
|
| 82 |
+
],
|
| 83 |
+
"dtype": "float32"
|
| 84 |
+
},
|
| 85 |
+
{
|
| 86 |
+
"shape": [
|
| 87 |
+
1,
|
| 88 |
+
300,
|
| 89 |
+
32
|
| 90 |
+
],
|
| 91 |
+
"dtype": "float32"
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"shape": [
|
| 95 |
+
1,
|
| 96 |
+
32,
|
| 97 |
+
160,
|
| 98 |
+
160
|
| 99 |
+
],
|
| 100 |
+
"dtype": "float32"
|
| 101 |
+
}
|
| 102 |
+
]
|
| 103 |
+
}
|
| 104 |
+
}
|
| 105 |
}
|
| 106 |
]
|
| 107 |
}
|
x/xnnpack/fast_sam_x_xnnpack_int8.pte
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fcd82ab54de24bb53919c3f9c37585a62e53a70635ff6791a3b61ca36364aa0f
|
| 3 |
+
size 104428800
|