Xenova HF Staff whitphx HF Staff commited on
Commit
f95a0b0
·
verified ·
1 Parent(s): 244dcce

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 (efd4c34f1e36a0a343b7b45bf0eb7da897ec9a82)


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

README.md CHANGED
@@ -5,4 +5,22 @@ library_name: transformers.js
5
 
6
  https://huggingface.co/google/mt5-base 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/mt5-base 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/mt5-base');
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:cb73ef21de1d6cdbe0b874424f1ad8cbbdb8df11306d6551135cba2d9ef5ed00
3
+ size 940566851
onnx/decoder_model_fp16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:01bcf8f9b8bb645b7ebd98b7e82b4afc743d9c82a0cc76f77daf0fba0d38ffc8
3
+ size 995234596
onnx/decoder_model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7ed3a4a6a6db571b4140a85a1f493be98b94ce4677c7a7f0606ccca99b854075
3
+ size 498030326
onnx/decoder_model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6155728a9601564d5dd77b852a7e6c5bc70be9c8dcc4ee533bd07dd32e98302e
3
+ size 959649147
onnx/decoder_model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:398028f06fb661357debd51adae296f8651673e635830d787d6b782cdd612e90
3
+ size 556339424
onnx/decoder_model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f8c929fb20f36ca7c7c27fe29b8a0ae3c058fc12089bee9b789a07196c759d7d
3
+ size 498030387
onnx/decoder_with_past_model_bnb4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:10d70ad1b658f2747f540db3da4924ec9e12c097952dc45381a33671fb610e4b
3
+ size 932535425
onnx/decoder_with_past_model_fp16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:797a0e2d49cb46900cac381c09a6b28d678175a00c94c4f62da7b472d8a742cc
3
+ size 966867853
onnx/decoder_with_past_model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:caa0aa0cf11ff9aa5a2abafdf7a5d0b5016c79fee34428905b58b390d5f8f7fa
3
+ size 483786137
onnx/decoder_with_past_model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:79727e7470f863d3ea348fc8a5aa9b64f54929f9e0b6417ce6777ffbbd0e8f11
3
+ size 950733153
onnx/decoder_with_past_model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a1230c0f55c6c025c424fad48c494d60b23855d2a99aa9f31fa333087f83bf9c
3
+ size 548318009
onnx/decoder_with_past_model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b6cc31f47939d6d67c7f7117782a2ef5937b421c44399defdf525f45e8302d6a
3
+ size 483786184
onnx/encoder_model_bnb4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dafc59255038056838b6bb5372f048967a25d31e4dafcf39b3d920e7b11afd30
3
+ size 816395674
onnx/encoder_model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:093b51d6f200477d8fecea2aef9b98e30a1b2c36a2433ffd6276cef450d4f4f9
3
+ size 277376012
onnx/encoder_model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:188d86b27c0f7fec11ece8521dfcb43c6addaae0aab05f1cd28d490d3487fcf7
3
+ size 821703466
onnx/encoder_model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:85ce0820c47fd8a9f45f8d80c279bd2c2efe1f65e5e475742cf3b29487f9788e
3
+ size 432184603
onnx/encoder_model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c2a5f43242cba4a79a12fa06eb2ee9cc41f18c0a98a65b76f0e661081c995cf9
3
+ size 277376053