mlboydaisuke commited on
Commit
ea82085
·
verified ·
1 Parent(s): 6a9fcd4

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +19 -12
README.md CHANGED
@@ -11,30 +11,37 @@ base_model:
11
  ---
12
  # dinov2_vits14 — ExecuTorch XNNPACK
13
 
14
- `dinov2_vits14_xnnpack_fp32.pte` (88.4 MB, fp32, XNNPACK-delegated)
15
-
16
  - **Source**: facebookresearch/dinov2 (torch.hub)
17
  - **License**: Apache-2.0
18
  - **Input**: [[1, 3, 518, 518]] — RGB, ImageNet norm, 518x518
19
  - **Output**: cls token [1,384], patch tokens [1,1369,384]
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, 384] | 2.494e-05 | 1.000000 |
28
- | 1 | [1, 1369, 384] | 1.180e-04 | 1.000000 |
29
 
30
- Median latency over 10 runs (single Mac process, reference only — device numbers to follow):
31
- ExecuTorch 161.2 ms vs torch eager 50.1 ms.
32
 
33
  ## Conversion
34
 
35
  torch.export -> to_edge_transform_and_lower(XnnpackPartitioner) -> .pte
36
  (conversion scripts: [executorch-models](https://github.com/john-rocky/executorch-models))
37
-
38
-
39
- ---
40
- Part of [executorch-models](https://github.com/john-rocky/executorch-models) — a verified .pte zoo for ExecuTorch. Conversion scripts and all models are indexed there.
 
11
  ---
12
  # dinov2_vits14 — ExecuTorch XNNPACK
13
 
 
 
14
  - **Source**: facebookresearch/dinov2 (torch.hub)
15
  - **License**: Apache-2.0
16
  - **Input**: [[1, 3, 518, 518]] — RGB, ImageNet norm, 518x518
17
  - **Output**: cls token [1,384], patch tokens [1,1369,384]
18
 
19
+ ## Variants
20
+
21
+ All variants take and return fp32 tensors — swap the `.pte` file, keep your app code.
22
+
23
+ | precision | file | size (MB) | parity vs fp32 eager (worst corr) | Mac median (ms)* |
24
+ |-----------|------|-----------|------------------------------------|------------------|
25
+ | fp32 | `dinov2_vits14_xnnpack_fp32.pte` | 88.4 | 1.000000 | 159.0 |
26
+ | fp16 | `dinov2_vits14_xnnpack_fp16.pte` | 44.8 | 0.999945 | 283.7 |
27
+ | int8 (dynamic) | `dinov2_vits14_xnnpack_int8.pte` | 24.9 | 0.998009 | 155.7 |
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: 50.8 ms).
31
 
32
+ ## Verification (executorch 1.4.0, torch 2.13.0)
33
+
34
+ Parity is measured against the fp32 eager model on real image input; `corr` is
35
+ the correlation over all elements of each output tensor.
36
 
37
  | output | shape | max_abs_diff | corr |
38
  |--------|-------|--------------|------|
39
+ | 0 | [1, 384] | 3.219e-05 | 1.000000 |
40
+ | 1 | [1, 1369, 384] | 4.311e-04 | 1.000000 |
41
 
42
+ XNNPACK delegate coverage (fp32): 66.7% (414/621 ops); ops left on the portable kernels: `aten.expand_copy.default` x49, `aten.squeeze_copy.dims` x36, `aten.native_layer_norm.default` x25, `aten.mul.Scalar` x24, `aten.logical_not.default` x24, `aten.eq.Scalar` x12, `aten.full_like.default` x12, `aten.any.dim` x12, `aten.where.self` x12, `aten.select_copy.int` x1
 
43
 
44
  ## Conversion
45
 
46
  torch.export -> to_edge_transform_and_lower(XnnpackPartitioner) -> .pte
47
  (conversion scripts: [executorch-models](https://github.com/john-rocky/executorch-models))