Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -9,7 +9,7 @@ tags:
|
|
| 9 |
base_model:
|
| 10 |
- openai/clip-vit-base-patch32
|
| 11 |
---
|
| 12 |
-
# clip_vit_b32_image — ExecuTorch
|
| 13 |
|
| 14 |
- **Source**: openai/clip-vit-base-patch32
|
| 15 |
- **License**: MIT
|
|
@@ -20,11 +20,19 @@ base_model:
|
|
| 20 |
|
| 21 |
All variants take and return fp32 tensors — swap the `.pte` file, keep your app code.
|
| 22 |
|
| 23 |
-
|
|
| 24 |
|-----------|------|-----------|------------------------------------|------------------|
|
| 25 |
| fp32 | `clip_vit_b32_image_xnnpack_fp32.pte` | 351.6 | 1.000000 | 19.0 |
|
| 26 |
| fp16 | `clip_vit_b32_image_xnnpack_fp16.pte` | 180.7 | 0.999996 | 26.1 |
|
| 27 |
| int8 (dynamic) | `clip_vit_b32_image_xnnpack_int8.pte` | 95.9 | 0.995739 | 18.4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
\*Mac arm64, single process, median of 10 — a reference point for relative cost
|
| 30 |
only, not a device number (torch eager fp32 on the same machine: 18.5 ms).
|
|
@@ -48,7 +56,7 @@ XNNPACK delegate coverage (fp32): 69.3% (390/563 ops); ops left on the portable
|
|
| 48 |
|
| 49 |
## Conversion
|
| 50 |
|
| 51 |
-
torch.export -> to_edge_transform_and_lower(
|
| 52 |
(conversion scripts: [executorch-models](https://github.com/john-rocky/executorch-models))
|
| 53 |
|
| 54 |
This repo holds **both towers**: `clip_vit_b32_image_xnnpack_fp32.pte` (image) and
|
|
|
|
| 9 |
base_model:
|
| 10 |
- openai/clip-vit-base-patch32
|
| 11 |
---
|
| 12 |
+
# clip_vit_b32_image — ExecuTorch
|
| 13 |
|
| 14 |
- **Source**: openai/clip-vit-base-patch32
|
| 15 |
- **License**: MIT
|
|
|
|
| 20 |
|
| 21 |
All variants take and return fp32 tensors — swap the `.pte` file, keep your app code.
|
| 22 |
|
| 23 |
+
| build | file | size (MB) | parity vs fp32 eager (worst corr) | Mac median (ms)* |
|
| 24 |
|-----------|------|-----------|------------------------------------|------------------|
|
| 25 |
| fp32 | `clip_vit_b32_image_xnnpack_fp32.pte` | 351.6 | 1.000000 | 19.0 |
|
| 26 |
| fp16 | `clip_vit_b32_image_xnnpack_fp16.pte` | 180.7 | 0.999996 | 26.1 |
|
| 27 |
| int8 (dynamic) | `clip_vit_b32_image_xnnpack_int8.pte` | 95.9 | 0.995739 | 18.4 |
|
| 28 |
+
| Core ML (fp16, iOS) | `clip_vit_b32_image_coreml_all.pte` | 176.2 | 0.999998 | 3.5 |
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
The Core ML build is the same graph lowered to Apple's Neural Engine instead of
|
| 32 |
+
XNNPACK, which is CPU-only. On an iPhone 17 Pro, Depth-Anything-V2-Small runs
|
| 33 |
+
500.8 ms through XNNPACK and 42.7 ms through Core ML, at half the file size. It
|
| 34 |
+
computes in fp16 and is iOS-only; the XNNPACK files stay the portable option and
|
| 35 |
+
are what runs on Android.
|
| 36 |
|
| 37 |
\*Mac arm64, single process, median of 10 — a reference point for relative cost
|
| 38 |
only, not a device number (torch eager fp32 on the same machine: 18.5 ms).
|
|
|
|
| 56 |
|
| 57 |
## Conversion
|
| 58 |
|
| 59 |
+
torch.export -> to_edge_transform_and_lower(partitioner) -> .pte
|
| 60 |
(conversion scripts: [executorch-models](https://github.com/john-rocky/executorch-models))
|
| 61 |
|
| 62 |
This repo holds **both towers**: `clip_vit_b32_image_xnnpack_fp32.pte` (image) and
|