Xenova HF Staff whitphx HF Staff commited on
Commit
46b6348
·
verified ·
1 Parent(s): 6fa7962

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 (69caf2564e2fc6a489080c2cbe01ebf561d022ce)


Co-authored-by: Yuichiro Tachibana <[email protected]>

README.md CHANGED
@@ -6,4 +6,23 @@ pipeline_tag: zero-shot-classification
6
 
7
  https://huggingface.co/Narsil/deberta-large-mnli-zero-cls 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/Narsil/deberta-large-mnli-zero-cls 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 classification.
17
+
18
+ ```js
19
+ import { pipeline } from '@huggingface/transformers';
20
+
21
+ const classifier = await pipeline('zero-shot-classification', 'Xenova/deberta-large-mnli-zero-cls');
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:8bd68c65fa4aee4d3e232271b6c0eb0abb2a31005289745efc7cd91fe54c77f7
3
+ size 414629112
onnx/model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b333b08a9470ba921e2918f3dce581be972db2b998ef5f866cdee213fec26f49
3
+ size 411383910
onnx/model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c743617dbac779933ba7b707ec2920a6418873917f4e7121528040d78701e6bc
3
+ size 436648032
onnx/model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:00080bd325e9e1fb6bc3d912f4cfe2c4cfe458256ef0298d5ea6d4807049661f
3
+ size 306839838
onnx/model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:531ac43ce97e676abbc436f98d5a155c45404cc2039dfdd5400cc35775e61fb3
3
+ size 411383986