Add/update the quantized ONNX model files and README.md for Transformers.js v3

#1
by whitphx - opened
README.md CHANGED
@@ -6,4 +6,20 @@ pipeline_tag: feature-extraction
6
 
7
  https://huggingface.co/squeezebert/squeezebert-mnli 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/squeezebert/squeezebert-mnli 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/squeezebert-mnli');
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:cdaf87e4d80c9d60ae265901ffb7d5954926a378317587d36b1aadc8378ae603
3
+ size 202257721
onnx/model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cdaf87e4d80c9d60ae265901ffb7d5954926a378317587d36b1aadc8378ae603
3
+ size 202257721
onnx/model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eab10cdeece1000f58abd09e70e8d63a84ed5cf8472f8a890645b547e60a6ef8
3
+ size 101250462
onnx/model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:93bfcbbb0411c81e26cce62967495def32a824d7b7ca0584b36316cbe9eb8df5
3
+ size 51229228