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 (ef4006e4379d06c1d1d78e95315d32cd06785e63)
Co-authored-by: Yuichiro Tachibana <whitphx@users.noreply.huggingface.co>
- README.md +19 -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,23 @@ pipeline_tag: zero-shot-classification
|
|
6 |
|
7 |
https://huggingface.co/MoritzLaurer/mDeBERTa-v3-base-xnli-multilingual-nli-2mil7 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/MoritzLaurer/mDeBERTa-v3-base-xnli-multilingual-nli-2mil7 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:** Zero-shot text classification.
|
17 |
+
|
18 |
+
```js
|
19 |
+
import { pipeline } from '@huggingface/transformers';
|
20 |
+
|
21 |
+
const classifier = await pipeline('zero-shot-classification', 'Xenova/mDeBERTa-v3-base-xnli-multilingual-nli-2mil7');
|
22 |
+
const output = await classifier(
|
23 |
+
'I love transformers!',
|
24 |
+
['positive', 'negative']
|
25 |
+
);
|
26 |
+
```
|
27 |
+
|
28 |
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:563d1b9298ce4cfc5d4a4366584a3f26364d0cfaac0f062a448597dd229f20e6
|
3 |
+
size 860083797
|
onnx/model_int8.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0e00534691cac71d2a9a0319bce19df9d7c6f003acea00bef9967560584c1a77
|
3 |
+
size 317250309
|
onnx/model_q4.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ece72d29def4460f1551c799a461eac6c8317087a31fb3caf7107c8a24b9562d
|
3 |
+
size 865391685
|
onnx/model_q4f16.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c3c2f5e098fa352c7c99b236e0c6415b7dea080fb687286bef8884fcf9f7deb9
|
3 |
+
size 454245538
|
onnx/model_uint8.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:953cc072cd1108e8dfb3cc85975559b770637adc4cf0844c9d2333ea2172f91f
|
3 |
+
size 317250346
|