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 (e8daf6e9fd6ea82870d812f461dd284e52931c37)
Co-authored-by: Yuichiro Tachibana <whitphx@users.noreply.huggingface.co>
- 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-dot-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-dot-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-dot-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:348c5bcfe7e59aecae378c84e9c87c67a7edaf9ebe302e82a8ee41216db3d485
|
3 |
+
size 143908388
|
onnx/model_int8.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b8266eb977002ca665d04f9d26bd72db13340ef2daccb826202704e26c7046f1
|
3 |
+
size 109622281
|
onnx/model_q4.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:97915a599c1fefcd20b94329b3e332b6867629bc0cfaaee8bc4376552d51fb59
|
3 |
+
size 149216276
|
onnx/model_q4f16.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:93ec164bf95323422f25e34284c4f0dbcb642c80c1b94c23f37620615307bfa4
|
3 |
+
size 95985975
|
onnx/model_uint8.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d4f11c1dba5b7d345e55bbad59044da57a3d452a6dd931a7c82ff0bd6343d74e
|
3 |
+
size 109622316
|