msluszniak commited on
Commit
7bb471a
·
verified ·
1 Parent(s): 85a52f7

Add XNNPACK int8 export

Browse files
.gitattributes CHANGED
@@ -40,3 +40,4 @@ coreml/multi_qa_minilm_l6_cos_v1_coreml_fp16.pte filter=lfs diff=lfs merge=lfs -
40
  coreml/multi_qa_minilm_l6_cos_v1_coreml_fp32.pte filter=lfs diff=lfs merge=lfs -text
41
  vulkan/multi_qa_minilm_l6_cos_v1_vulkan_fp16.pte filter=lfs diff=lfs merge=lfs -text
42
  coreml/multi_qa_minilm_l6_cos_v1_coreml_int8.pte filter=lfs diff=lfs merge=lfs -text
 
 
40
  coreml/multi_qa_minilm_l6_cos_v1_coreml_fp32.pte filter=lfs diff=lfs merge=lfs -text
41
  vulkan/multi_qa_minilm_l6_cos_v1_vulkan_fp16.pte filter=lfs diff=lfs merge=lfs -text
42
  coreml/multi_qa_minilm_l6_cos_v1_coreml_int8.pte filter=lfs diff=lfs merge=lfs -text
43
+ xnnpack/multi_qa_minilm_l6_cos_v1_xnnpack_int8.pte filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -17,21 +17,36 @@ Upstream model: [multi-qa-MiniLM-L6-cos-v1](https://huggingface.co/sentence-tran
17
  | Path | Backend | Precision |
18
  | --- | --- | --- |
19
  | `coreml/multi_qa_minilm_l6_cos_v1_coreml_fp16.pte` | coreml | fp16 |
 
20
  | `vulkan/multi_qa_minilm_l6_cos_v1_vulkan_fp16.pte` | vulkan | fp16 |
21
  | `xnnpack/multi_qa_minilm_l6_cos_v1_xnnpack_fp32.pte` | xnnpack | fp32 |
 
 
 
 
 
 
 
 
 
 
 
 
22
 
23
  ## Repository structure
24
 
25
  ```
26
  config.json 47 B
27
- coreml/config.json 947 B
28
  coreml/multi_qa_minilm_l6_cos_v1_coreml_fp16.pte 43.4 MB
 
29
  tokenizer.json 695 kB
30
  tokenizer_config.json 383 B
31
  vulkan/config.json 947 B
32
  vulkan/multi_qa_minilm_l6_cos_v1_vulkan_fp16.pte 43.1 MB
33
- xnnpack/config.json 949 B
34
  xnnpack/multi_qa_minilm_l6_cos_v1_xnnpack_fp32.pte 86.2 MB
 
35
  ```
36
 
37
  ## Compatibility
 
17
  | Path | Backend | Precision |
18
  | --- | --- | --- |
19
  | `coreml/multi_qa_minilm_l6_cos_v1_coreml_fp16.pte` | coreml | fp16 |
20
+ | `coreml/multi_qa_minilm_l6_cos_v1_coreml_int8.pte` | coreml | int8 |
21
  | `vulkan/multi_qa_minilm_l6_cos_v1_vulkan_fp16.pte` | vulkan | fp16 |
22
  | `xnnpack/multi_qa_minilm_l6_cos_v1_xnnpack_fp32.pte` | xnnpack | fp32 |
23
+ | `xnnpack/multi_qa_minilm_l6_cos_v1_xnnpack_int8.pte` | xnnpack | int8 |
24
+
25
+ ## XNNPACK int8
26
+
27
+ `xnnpack/multi_qa_minilm_l6_cos_v1_xnnpack_int8.pte` is 8da8w (int8 dynamic activations, int8 per-channel
28
+ weights) on the Linear layers, with an int8 word-embedding table. SQuAD v1.1 dev passage
29
+ retrieval (2000 questions against their 315 paragraphs), dot product:
30
+
31
+ | | top-1 | MRR |
32
+ | --- | --- | --- |
33
+ | fp32 | 57.50 | 0.6972 |
34
+ | int8 | 57.55 | 0.6973 |
35
 
36
  ## Repository structure
37
 
38
  ```
39
  config.json 47 B
40
+ coreml/config.json 1.7 kB
41
  coreml/multi_qa_minilm_l6_cos_v1_coreml_fp16.pte 43.4 MB
42
+ coreml/multi_qa_minilm_l6_cos_v1_coreml_int8.pte 21.8 MB
43
  tokenizer.json 695 kB
44
  tokenizer_config.json 383 B
45
  vulkan/config.json 947 B
46
  vulkan/multi_qa_minilm_l6_cos_v1_vulkan_fp16.pte 43.1 MB
47
+ xnnpack/config.json 1.6 kB
48
  xnnpack/multi_qa_minilm_l6_cos_v1_xnnpack_fp32.pte 86.2 MB
49
+ xnnpack/multi_qa_minilm_l6_cos_v1_xnnpack_int8.pte 21.9 MB
50
  ```
51
 
52
  ## Compatibility
xnnpack/config.json CHANGED
@@ -40,6 +40,39 @@
40
  ]
41
  }
42
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  }
44
  ]
45
  }
 
40
  ]
41
  }
42
  }
43
+ },
44
+ {
45
+ "file": "multi_qa_minilm_l6_cos_v1_xnnpack_int8.pte",
46
+ "precision": "int8",
47
+ "methods": {
48
+ "forward": {
49
+ "inputs": [
50
+ {
51
+ "shape": [
52
+ 1,
53
+ 509
54
+ ],
55
+ "dtype": "int64"
56
+ },
57
+ {
58
+ "shape": [
59
+ 1,
60
+ 509
61
+ ],
62
+ "dtype": "int64"
63
+ }
64
+ ],
65
+ "outputs": [
66
+ {
67
+ "shape": [
68
+ 1,
69
+ 384
70
+ ],
71
+ "dtype": "float32"
72
+ }
73
+ ]
74
+ }
75
+ }
76
  }
77
  ]
78
  }
xnnpack/multi_qa_minilm_l6_cos_v1_xnnpack_int8.pte ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f44e158e4d45cb328c74f42be037307d20a298cbe760d0e54fdeef07941ced67
3
+ size 23010688