.gitattributes CHANGED
@@ -35,9 +35,3 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  all-MiniLM-L6-v2.pte filter=lfs diff=lfs merge=lfs -text
37
  all-MiniLM-L6-v2_xnnpack.pte filter=lfs diff=lfs merge=lfs -text
38
- xnnpack/all_minilm_l6_v2_xnnpack_fp32.pte filter=lfs diff=lfs merge=lfs -text
39
- coreml/all_minilm_l6_v2_coreml_fp16.pte filter=lfs diff=lfs merge=lfs -text
40
- coreml/all_minilm_l6_v2_coreml_fp32.pte filter=lfs diff=lfs merge=lfs -text
41
- vulkan/all_minilm_l6_v2_vulkan_fp32.pte filter=lfs diff=lfs merge=lfs -text
42
- vulkan/all_minilm_l6_v2_vulkan_fp16.pte filter=lfs diff=lfs merge=lfs -text
43
- coreml/all_minilm_l6_v2_coreml_int8.pte filter=lfs diff=lfs merge=lfs -text
 
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  all-MiniLM-L6-v2.pte filter=lfs diff=lfs merge=lfs -text
37
  all-MiniLM-L6-v2_xnnpack.pte filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
README.md CHANGED
@@ -1,49 +1,22 @@
1
  ---
2
  license: apache-2.0
3
- pipeline_tag: sentence-similarity
4
- library_name: executorch
5
  ---
6
 
7
- # all-MiniLM-L6-v2
8
 
9
- This repository hosts the **all-MiniLM-L6-v2** models exported for the
10
- [React Native ExecuTorch](https://www.npmjs.com/package/react-native-executorch)
11
- library as ExecuTorch `.pte` programs, ready to run on device.
12
 
13
- Upstream model: [all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2/tree/main)
14
 
15
- ## Variants
16
-
17
- | Path | Backend | Precision |
18
- | --- | --- | --- |
19
- | `coreml/all_minilm_l6_v2_coreml_fp16.pte` | coreml | fp16 |
20
- | `vulkan/all_minilm_l6_v2_vulkan_fp16.pte` | vulkan | fp16 |
21
- | `xnnpack/all_minilm_l6_v2_xnnpack_fp32.pte` | xnnpack | fp32 |
22
-
23
- ## Repository structure
24
 
25
- ```
26
- config.json 38 B
27
- coreml/all_minilm_l6_v2_coreml_fp16.pte 43.4 MB
28
- coreml/config.json 929 B
29
- tokenizer.json 695 kB
30
- tokenizer_config.json 350 B
31
- vulkan/all_minilm_l6_v2_vulkan_fp16.pte 43.1 MB
32
- vulkan/config.json 929 B
33
- xnnpack/all_minilm_l6_v2_xnnpack_fp32.pte 86.2 MB
34
- xnnpack/config.json 931 B
35
- ```
36
 
37
- ## Compatibility
38
 
39
- These files are published for the **ExecuTorch v1.4.1** runtime. ExecuTorch
40
- gives no forward compatibility guarantee, so an older runtime may fail to load
41
- them.
42
 
43
- To use them in React Native ExecuTorch, pass the model constant shipped in the
44
- library's model registry to the corresponding task pipeline. See the
45
- [documentation](https://docs.swmansion.com/react-native-executorch/docs/fundamentals/downloading-models).
46
 
47
- To load these files in your own ExecuTorch runtime, read the
48
- [compatibility note](https://github.com/pytorch/executorch/blob/main/runtime/COMPATIBILITY.md)
49
- first.
 
1
  ---
2
  license: apache-2.0
 
 
3
  ---
4
 
5
+ # Introduction
6
 
7
+ This repository hosts the [all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2/tree/main) models for the [React Native ExecuTorch](https://www.npmjs.com/package/react-native-executorch) library. It includes the model exported for xnnpack in `.pte` format, ready for use in the **ExecuTorch** runtime.
 
 
8
 
9
+ If you'd like to run these models in your own ExecuTorch runtime, refer to the [official documentation](https://pytorch.org/executorch/stable/index.html) for setup instructions.
10
 
11
+ ## Compatibility
 
 
 
 
 
 
 
 
12
 
13
+ If you intend to use this model outside of React Native ExecuTorch, make sure your runtime is compatible with the **ExecuTorch** version used to export the `.pte` files. For more details, see the compatibility note in the [ExecuTorch GitHub repository](https://github.com/pytorch/executorch/blob/11d1742fdeddcf05bc30a6cfac321d2a2e3b6768/runtime/COMPATIBILITY.md?plain=1#L4). If you work with React Native ExecuTorch, the constants from the library will guarantee compatibility with runtime used behind the scenes.
 
 
 
 
 
 
 
 
 
 
14
 
15
+ These models were exported using `v0.6.0` version and **no forward compatibility** is guaranteed. Older versions of the runtime may not work with these files.
16
 
17
+ ### Repository Structure
 
 
18
 
19
+ All files are located in the root directory.
 
 
20
 
21
+ - The `.pte` file should be as the `modelSource` argument.
22
+ - The tokenizer is provided as `tokenizer.json` in the root directory.
 
coreml/all_minilm_l6_v2_coreml_fp16.pte → all-MiniLM-L6-v2_xnnpack.pte RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:03c8da66ae5ba0e63169074d3ab845f030ae6f76df798f3338e269bc9575ddff
3
- size 45460244
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fda3d0dc0a8ea05065df154b91087cc6b6d03d8f1af85a037e13792a2be1654a
3
+ size 90987520
config.json CHANGED
@@ -1,3 +1,3 @@
1
  {
2
  "modelName": "all-MiniLM-L6-v2"
3
- }
 
1
  {
2
  "modelName": "all-MiniLM-L6-v2"
3
+ }
coreml/all_minilm_l6_v2_coreml_int8.pte DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:f45794344ee2bc8eb991f125bb92ed4fdca1fdb1968601d68a8ff29d2b12da23
3
- size 22817740
 
 
 
 
coreml/config.json DELETED
@@ -1,83 +0,0 @@
1
- {
2
- "$schema": "https://huggingface.co/software-mansion/react-native-executorch-spec/resolve/main/config.schema.json",
3
- "model": "all_minilm_l6_v2",
4
- "family": "sbert",
5
- "capabilities": [
6
- "text-embedding"
7
- ],
8
- "backend": "coreml",
9
- "license": "apache-2.0",
10
- "variants": [
11
- {
12
- "file": "all_minilm_l6_v2_coreml_int8.pte",
13
- "precision": "int8",
14
- "quantized": true,
15
- "default": true,
16
- "methods": {
17
- "forward": {
18
- "inputs": [
19
- {
20
- "shape": [
21
- 1,
22
- 254
23
- ],
24
- "dtype": "int64"
25
- },
26
- {
27
- "shape": [
28
- 1,
29
- 254
30
- ],
31
- "dtype": "int64"
32
- }
33
- ],
34
- "outputs": [
35
- {
36
- "shape": [
37
- 1,
38
- 384
39
- ],
40
- "dtype": "float32"
41
- }
42
- ]
43
- }
44
- },
45
- "quantize": "int8"
46
- },
47
- {
48
- "file": "all_minilm_l6_v2_coreml_fp16.pte",
49
- "precision": "fp16",
50
- "quantized": false,
51
- "default": true,
52
- "methods": {
53
- "forward": {
54
- "inputs": [
55
- {
56
- "shape": [
57
- 1,
58
- 254
59
- ],
60
- "dtype": "int64"
61
- },
62
- {
63
- "shape": [
64
- 1,
65
- 254
66
- ],
67
- "dtype": "int64"
68
- }
69
- ],
70
- "outputs": [
71
- {
72
- "shape": [
73
- 1,
74
- 384
75
- ],
76
- "dtype": "float32"
77
- }
78
- ]
79
- }
80
- }
81
- }
82
- ]
83
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tokenizer.json CHANGED
The diff for this file is too large to render. See raw diff
 
vulkan/all_minilm_l6_v2_vulkan_fp16.pte DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:8f9aed61f17b26a45551224ba06f6268431d476edbcc71abb43d4e70a22c23bf
3
- size 45208066
 
 
 
 
vulkan/config.json DELETED
@@ -1,45 +0,0 @@
1
- {
2
- "$schema": "https://huggingface.co/software-mansion/react-native-executorch-spec/resolve/main/config.schema.json",
3
- "model": "all_minilm_l6_v2",
4
- "family": "sbert",
5
- "capabilities": [
6
- "text-embedding"
7
- ],
8
- "backend": "vulkan",
9
- "license": "apache-2.0",
10
- "variants": [
11
- {
12
- "file": "all_minilm_l6_v2_vulkan_fp16.pte",
13
- "precision": "fp16",
14
- "methods": {
15
- "forward": {
16
- "inputs": [
17
- {
18
- "shape": [
19
- 1,
20
- 254
21
- ],
22
- "dtype": "int64"
23
- },
24
- {
25
- "shape": [
26
- 1,
27
- 254
28
- ],
29
- "dtype": "int64"
30
- }
31
- ],
32
- "outputs": [
33
- {
34
- "shape": [
35
- 1,
36
- 384
37
- ],
38
- "dtype": "float32"
39
- }
40
- ]
41
- }
42
- }
43
- }
44
- ]
45
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
xnnpack/all_minilm_l6_v2_xnnpack_fp32.pte DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:3e59e86abfe09d5aa533fec095cef1f38cbdf21d9d5798996daea4d38a54dac7
3
- size 90391296
 
 
 
 
xnnpack/config.json DELETED
@@ -1,45 +0,0 @@
1
- {
2
- "$schema": "https://huggingface.co/software-mansion/react-native-executorch-spec/resolve/main/config.schema.json",
3
- "model": "all_minilm_l6_v2",
4
- "family": "sbert",
5
- "capabilities": [
6
- "text-embedding"
7
- ],
8
- "backend": "xnnpack",
9
- "license": "apache-2.0",
10
- "variants": [
11
- {
12
- "file": "all_minilm_l6_v2_xnnpack_fp32.pte",
13
- "precision": "fp32",
14
- "methods": {
15
- "forward": {
16
- "inputs": [
17
- {
18
- "shape": [
19
- 1,
20
- 254
21
- ],
22
- "dtype": "int64"
23
- },
24
- {
25
- "shape": [
26
- 1,
27
- 254
28
- ],
29
- "dtype": "int64"
30
- }
31
- ],
32
- "outputs": [
33
- {
34
- "shape": [
35
- 1,
36
- 384
37
- ],
38
- "dtype": "float32"
39
- }
40
- ]
41
- }
42
- }
43
- }
44
- ]
45
- }