Add/update the quantized ONNX model files and README.md for Transformers.js v3 (#1)
Browse files- Add/update the quantized ONNX model files and README.md for Transformers.js v3 (6b5155d7f46cbbaac271bbea0516aa05bce3007b)
Co-authored-by: Yuichiro Tachibana <[email protected]>
- README.md +16 -0
- onnx/model_bnb4.onnx +3 -0
- onnx/model_int8.onnx +3 -0
- onnx/model_q4.onnx +3 -0
- onnx/model_q4f16.onnx +3 -0
- onnx/model_uint8.onnx +3 -0
README.md
CHANGED
@@ -6,4 +6,20 @@ pipeline_tag: feature-extraction
|
|
6 |
|
7 |
https://huggingface.co/sentence-transformers/multi-qa-mpnet-base-cos-v1 with ONNX weights to be compatible with Transformers.js.
|
8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
Note: Having a separate repo for ONNX weights is intended to be a temporary solution until WebML gains more traction. If you would like to make your models web-ready, we recommend converting to ONNX using [🤗 Optimum](https://huggingface.co/docs/optimum/index) and structuring your repo like this one (with ONNX weights located in a subfolder named `onnx`).
|
|
|
6 |
|
7 |
https://huggingface.co/sentence-transformers/multi-qa-mpnet-base-cos-v1 with ONNX weights to be compatible with Transformers.js.
|
8 |
|
9 |
+
## Usage (Transformers.js)
|
10 |
+
|
11 |
+
If you haven't already, you can install the [Transformers.js](https://huggingface.co/docs/transformers.js) JavaScript library from [NPM](https://www.npmjs.com/package/@huggingface/transformers) using:
|
12 |
+
```bash
|
13 |
+
npm i @huggingface/transformers
|
14 |
+
```
|
15 |
+
|
16 |
+
**Example:** Run feature extraction.
|
17 |
+
|
18 |
+
```js
|
19 |
+
import { pipeline } from '@huggingface/transformers';
|
20 |
+
|
21 |
+
const extractor = await pipeline('feature-extraction', 'Xenova/multi-qa-mpnet-base-cos-v1');
|
22 |
+
const output = await extractor('This is a simple test.');
|
23 |
+
```
|
24 |
+
|
25 |
Note: Having a separate repo for ONNX weights is intended to be a temporary solution until WebML gains more traction. If you would like to make your models web-ready, we recommend converting to ONNX using [🤗 Optimum](https://huggingface.co/docs/optimum/index) and structuring your repo like this one (with ONNX weights located in a subfolder named `onnx`).
|
onnx/model_bnb4.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:13dd0e76f6f88824083147c6f2634769479798ad8f943ba891f751842acce41b
|
3 |
+
size 143908388
|
onnx/model_int8.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7da03f54cf916aab993b746cdbbf4792c9c250b4e66040c847abe3acb0013475
|
3 |
+
size 109622281
|
onnx/model_q4.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a4159eba3930ab11bae45da9213dcd97c647d521e0789abc9bae761f22b96009
|
3 |
+
size 149216276
|
onnx/model_q4f16.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a18f1d8da3cbabc281cd9f87bf7387f3e866e85ecf0b5428ea755ddf85935f4b
|
3 |
+
size 95985975
|
onnx/model_uint8.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ec54a697f446b70ff3b0419ec6ba53d9cedf137e5daef638a051da53c38fb93c
|
3 |
+
size 109622317
|