Xenova HF Staff whitphx HF Staff commited on
Commit
efdd560
·
verified ·
1 Parent(s): 226b6b1

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 (8eba5af7f4a62135c648dd9528ea975c0d387bb6)


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

README.md CHANGED
@@ -6,4 +6,20 @@ pipeline_tag: feature-extraction
6
 
7
  https://huggingface.co/sentence-transformers/all-roberta-large-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/all-roberta-large-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/all-roberta-large-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:9c7a247e0df5aa8875689741b9d53f5af886584578f4c86c1dd605c3a49c54b3
3
+ size 379722450
onnx/model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6fdb5770088b029eadfbfb4260fee6783940bdd6641cdeb8f815207c5f04f9dd
3
+ size 356000243
onnx/model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:943e13c7123d2a8904a65fc7fa865f3918a4e6eee1d35bdd099a85b5b3cead94
3
+ size 398595642
onnx/model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c59a770428fcb6aebf3a099d1d5934a93fc4da5d1e247f3e611c5f64ad8e1b06
3
+ size 275080885
onnx/model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0c28ecfb1dbb8054ab2c38acec511ee9721f22b6897a842bdba4dda008128d2c
3
+ size 356000316