Xenova HF Staff whitphx HF Staff commited on
Commit
a18ed53
·
verified ·
1 Parent(s): c83cba1

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

Browse files

- Add/update the quantized ONNX model files and README.md for Transformers.js v3 (678689764b301bbfae662d1eee21d5e673821e24)


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

README.md CHANGED
@@ -5,4 +5,22 @@ library_name: transformers.js
5
 
6
  https://huggingface.co/google/t5-v1_1-small with ONNX weights to be compatible with Transformers.js.
7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  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`).
 
5
 
6
  https://huggingface.co/google/t5-v1_1-small with ONNX weights to be compatible with Transformers.js.
7
 
8
+ ## Usage (Transformers.js)
9
+
10
+ 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:
11
+ ```bash
12
+ npm i @huggingface/transformers
13
+ ```
14
+
15
+ **Example:** Text-to-text generation.
16
+
17
+ ```js
18
+ import { pipeline } from '@huggingface/transformers';
19
+
20
+ const generator = await pipeline('text2text-generation', 'Xenova/t5-v1_1-small');
21
+ const output = await generator('how can I become more healthy?', {
22
+ max_new_tokens: 100,
23
+ });
24
+ ```
25
+
26
  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/decoder_model_bnb4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ad58fe4de133cf4f01849cf96b814a78be974296dd00fc39e4ce91a15f4da5ba
3
+ size 89503475
onnx/decoder_model_fp16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:89a213f4f2b2359e577387cae5044bddc194079e501d005aa77bd443a55bec04
3
+ size 116389149
onnx/decoder_model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b3bd2509090de24c0367e9db2bf2476b2ed4fcee6ec42ce47a9b747c5cd2fe0c
3
+ size 58454817
onnx/decoder_model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:07a50f5ad45e22fad174fb25a43c50524011c70db80742f1273365659021917b
3
+ size 92103875
onnx/decoder_model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:535d783e9d2b1e48525d2479fa933aecd44737410f7f1934798c745dd9289dcd
3
+ size 56580248
onnx/decoder_model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:718756e6f1e7f1b915ad805b0b65385ff9152e99ce446916953fb7889721c742
3
+ size 58454872
onnx/decoder_with_past_model_bnb4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:942b24d583e43881d2063ab571a698bccfea3a996f9ee24e6781b338675bc08c
3
+ size 87689295
onnx/decoder_with_past_model_fp16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:863b90f21c0252667453b59981dccf52c2112f3be69b8d97e1f8a8286448a521
3
+ size 110062088
onnx/decoder_with_past_model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:88c6a380dba9c45ee0499212cc3b8e4d657565296ba1848784726f727e131ab3
3
+ size 55251238
onnx/decoder_with_past_model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8cacc6c53db01caf8c9f043a72155589d8db6727ae829193d8dbc9427450b4c8
3
+ size 90093183
onnx/decoder_with_past_model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:721b28b3f62ca63faf0e30645d8756f724459cfd62aba46dadadcec060e68251
3
+ size 54772819
onnx/decoder_with_past_model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:22f5a7db292d7501bd580ffa28ccc5d67d7eb0d73ecbba3350d047858eeec90d
3
+ size 55251283
onnx/encoder_model_bnb4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:17c7be470b88e54a5bbbc3096a6d588e3395d3e04990fa71842d9755a70b536e
3
+ size 76585753
onnx/encoder_model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:771abf076c716850d4c345353399ccdb43554f5901938c62354149f6f2059043
3
+ size 35548105
onnx/encoder_model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:07499bae21ec298a45d638d9f375b87b0e5183a705956dfbb23e53b2ace9058b
3
+ size 77765041
onnx/encoder_model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6af6a2153384ee19326de64e1e65457ac11a64a767985fa254cc70daf45c675b
3
+ size 43669218
onnx/encoder_model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2c2800dc9580a6f0176ebc8f1057f9b464734e4506464a125846be331ab3766d
3
+ size 35548137