Xenova HF Staff whitphx HF Staff commited on
Commit
72a1ce8
·
verified ·
1 Parent(s): 4ca29e8

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 (1d5f5de616f4f1dea3ea57f5a2355aacaffa91a4)


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

README.md CHANGED
@@ -6,4 +6,23 @@ pipeline_tag: zero-shot-classification
6
 
7
  https://huggingface.co/MoritzLaurer/DeBERTa-v3-base-mnli-fever-anli 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/DeBERTa-v3-base-mnli-fever-anli 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 with DeBERTa.
17
+
18
+ ```js
19
+ import { pipeline } from '@huggingface/transformers';
20
+
21
+ const classifier = await pipeline('zero-shot-classification', 'Xenova/DeBERTa-v3-base-mnli-fever-anli');
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:846d8ba605fb2ccdde64274df284c466d7bcf49e7e39f421447e3b28b49cb601
3
+ size 482534997
onnx/model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2d54e10a8edf7d9932872fcc7caa7f5564026a5b5c35ba47b75f58141e81c944
3
+ size 222863108
onnx/model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a7e0f457b4600dfa208d1ca40db17328837af33d3a8bd05ed3cd7a6d0661e598
3
+ size 487842885
onnx/model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ff3363928329772ec8b1193a422418a32e954fd2faaf1a55de233608b1bc2b32
3
+ size 265471135
onnx/model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fb2367faac79f2a9806c73e2d8b889ec2b72212f96361ae7ca26422a016d79f6
3
+ size 222863146