mlboydaisuke commited on
Commit
8292afa
·
verified ·
1 Parent(s): afcde7a

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +39 -0
README.md ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ tags:
4
+ - executorch
5
+ - xnnpack
6
+ - pte
7
+ - on-device
8
+ - zero-shot-image-classification
9
+ base_model:
10
+ - openai/clip-vit-base-patch32
11
+ ---
12
+ # clip_vit_b32_image — ExecuTorch XNNPACK
13
+
14
+ `clip_vit_b32_image_xnnpack_fp32.pte` (351.6 MB, fp32, XNNPACK-delegated)
15
+
16
+ - **Source**: openai/clip-vit-base-patch32
17
+ - **License**: MIT
18
+ - **Input**: [[1, 3, 224, 224]] — RGB, CLIP norm (mean .481/.458/.408, std .269/.261/.276), 224x224
19
+ - **Output**: image embedding [1,512] (unnormalized; L2-normalize before cosine)
20
+
21
+ ## Verification (Mac arm64, executorch 1.4.0, torch 2.13.0)
22
+
23
+ Parity vs torch fp32 eager on random input:
24
+
25
+ | output | shape | max_abs_diff | corr |
26
+ |--------|-------|--------------|------|
27
+ | 0 | [1, 512] | 4.768e-06 | 1.000000 |
28
+
29
+ Median latency over 10 runs (single Mac process, reference only — device numbers to follow):
30
+ ExecuTorch 18.3 ms vs torch eager 17.8 ms.
31
+
32
+ ## Conversion
33
+
34
+ torch.export -> to_edge_transform_and_lower(XnnpackPartitioner) -> .pte
35
+ (conversion scripts: `convert/` in the conversion repo)
36
+
37
+ This repo holds **both towers**: `clip_vit_b32_image_xnnpack_fp32.pte` (image) and
38
+ `clip_vit_b32_text_xnnpack_fp32.pte` (text, fixed len 77 + attention mask).
39
+ L2-normalize both embeddings, then cosine-match.