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 (9f828f6eed863b2179d164347328a780cf05eff4)
Co-authored-by: Yuichiro Tachibana <whitphx@users.noreply.huggingface.co>
- README.md +18 -0
- onnx/decoder_model_bnb4.onnx +3 -0
- onnx/decoder_model_fp16.onnx +3 -0
- onnx/decoder_model_int8.onnx +3 -0
- onnx/decoder_model_q4.onnx +3 -0
- onnx/decoder_model_q4f16.onnx +3 -0
- onnx/decoder_model_uint8.onnx +3 -0
- onnx/decoder_with_past_model_bnb4.onnx +3 -0
- onnx/decoder_with_past_model_fp16.onnx +3 -0
- onnx/decoder_with_past_model_int8.onnx +3 -0
- onnx/decoder_with_past_model_q4.onnx +3 -0
- onnx/decoder_with_past_model_q4f16.onnx +3 -0
- onnx/decoder_with_past_model_uint8.onnx +3 -0
- onnx/encoder_model_bnb4.onnx +3 -0
- onnx/encoder_model_int8.onnx +3 -0
- onnx/encoder_model_q4.onnx +3 -0
- onnx/encoder_model_q4f16.onnx +3 -0
- onnx/encoder_model_uint8.onnx +3 -0
README.md
CHANGED
@@ -5,4 +5,22 @@ library_name: transformers.js
|
|
5 |
|
6 |
https://huggingface.co/google/mt5-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/mt5-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/mt5-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:9ea2f844673c928e9c2ca372188861076edb6db85d1da349c6fea45b0d2f3bbf
|
3 |
+
size 598714104
|
onnx/decoder_model_fp16.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8a158ae1c9cf9099d76d838f3103fb5e09bbbf381ba730885d6b610688a39d5d
|
3 |
+
size 562820382
|
onnx/decoder_model_int8.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:706dcbde07eb0a1f38f1fb538aa27091618398a515fe4d8a5306ef30ceabc7d7
|
3 |
+
size 281670434
|
onnx/decoder_model_q4.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bf81607d0a6833c1d2df68d06a6b8558b74f32aabf0c66c680404dd784a9ffc8
|
3 |
+
size 608289993
|
onnx/decoder_model_q4f16.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3a8db588f03b21fd0f71b7198b4d44ef0aa7c0a82f2f3862b7fa78fac9f5a243
|
3 |
+
size 342575260
|
onnx/decoder_model_uint8.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:914b8667657d9b64c5e4bdbf4ad36f0c6c1de125716c980d02079525ea4fc9ce
|
3 |
+
size 281670480
|
onnx/decoder_with_past_model_bnb4.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cc5a834c8ca1d3e1279de040a9b51a962133b6a1aa8659fc37a80275cc524ed2
|
3 |
+
size 596899696
|
onnx/decoder_with_past_model_fp16.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b12a2c34debdba24a9a634dd64f8994eaed7837eb802a0ca0d1f71b3060f17c7
|
3 |
+
size 556493021
|
onnx/decoder_with_past_model_int8.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:04cb1c014e579beeaf48d641e4a0798fa6c73e8125f12ab7aa85209e49bccbd5
|
3 |
+
size 278466627
|
onnx/decoder_with_past_model_q4.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7a010f9b7c12c594fc3bf773b7758abee04b461f3409fcf2e17b5a7e5dc7c9c3
|
3 |
+
size 606279073
|
onnx/decoder_with_past_model_q4f16.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a194480936aad73df35b6510eaebc5ad70408c900167bc867cb853544e6d91b5
|
3 |
+
size 340767531
|
onnx/decoder_with_past_model_uint8.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4a10adfeaa62d79f9eae933a89df8c689bbc0e44c2fe5f48a5ff850acc26a056
|
3 |
+
size 278466668
|
onnx/encoder_model_bnb4.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:be4f7370e2a7941e1fd982fed1971dd97732eadf6d036a91bf500a8e658976f4
|
3 |
+
size 523016988
|
onnx/encoder_model_int8.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c22516ed043515feed41466f1988de7efc0ad123509257edf9e2c3f52aba56f6
|
3 |
+
size 147155913
|
onnx/encoder_model_q4.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b462dc3cac22e176a49af15a4e06c2e7e21cb641e1d7928e51c6c968fc02508a
|
3 |
+
size 524196276
|
onnx/encoder_model_q4f16.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5165ee675f8cbfe1444d2c16b625ce032059a35b51c464cb17f748cb1598d5bb
|
3 |
+
size 266884834
|
onnx/encoder_model_uint8.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9d6fd4e75cee120b2b606096bdfe1a1bafc43645b9126a80a4f35865db65f669
|
3 |
+
size 147155947
|