Add/update the quantized ONNX model files and README.md for Transformers.js v3 (#3)
Browse files- Add/update the quantized ONNX model files and README.md for Transformers.js v3 (a0202a0928f6a8c12a1fa2117ed73160824c7bfb)
Co-authored-by: Yuichiro Tachibana <[email protected]>
- README.md +26 -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_merged_bnb4.onnx +3 -0
- onnx/decoder_model_merged_fp16.onnx +2 -2
- onnx/decoder_model_merged_int8.onnx +3 -0
- onnx/decoder_model_merged_q4.onnx +3 -0
- onnx/decoder_model_merged_q4f16.onnx +3 -0
- onnx/decoder_model_merged_uint8.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
@@ -7,4 +7,30 @@ pipeline_tag: summarization
|
|
7 |
|
8 |
https://huggingface.co/sshleifer/distilbart-cnn-6-6 with ONNX weights to be compatible with Transformers.js.
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
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`).
|
|
|
7 |
|
8 |
https://huggingface.co/sshleifer/distilbart-cnn-6-6 with ONNX weights to be compatible with Transformers.js.
|
9 |
|
10 |
+
## Usage (Transformers.js)
|
11 |
+
|
12 |
+
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:
|
13 |
+
```bash
|
14 |
+
npm i @huggingface/transformers
|
15 |
+
```
|
16 |
+
|
17 |
+
**Example:** Summarization.
|
18 |
+
|
19 |
+
```js
|
20 |
+
import { pipeline } from '@huggingface/transformers';
|
21 |
+
|
22 |
+
const generator = await pipeline('summarization', 'Xenova/distilbart-cnn-6-6');
|
23 |
+
const text = 'The tower is 324 metres (1,063 ft) tall, about the same height as an 81-storey building, ' +
|
24 |
+
'and the tallest structure in Paris. Its base is square, measuring 125 metres (410 ft) on each side. ' +
|
25 |
+
'During its construction, the Eiffel Tower surpassed the Washington Monument to become the tallest ' +
|
26 |
+
'man-made structure in the world, a title it held for 41 years until the Chrysler Building in New ' +
|
27 |
+
'York City was finished in 1930. It was the first structure to reach a height of 300 metres. Due to ' +
|
28 |
+
'the addition of a broadcasting aerial at the top of the tower in 1957, it is now taller than the ' +
|
29 |
+
'Chrysler Building by 5.2 metres (17 ft). Excluding transmitters, the Eiffel Tower is the second ' +
|
30 |
+
'tallest free-standing structure in France after the Millau Viaduct.';
|
31 |
+
const output = await generator(text, {
|
32 |
+
max_new_tokens: 100,
|
33 |
+
});
|
34 |
+
```
|
35 |
+
|
36 |
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:0bd965c68e7e8d3447d1cd0984bd80333006faba005d04422ef4aa7470d11b8e
|
3 |
+
size 267462255
|
onnx/decoder_model_fp16.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4230de4d68953eb23a45999a9666adedcba9b1dd8f1ddb881777af6e8c76c5f8
|
3 |
+
size 306878508
|
onnx/decoder_model_int8.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bbffe6cd1b1bf43558cb4ce7cc623f8203cfc7792996f488ba74c50f774740e3
|
3 |
+
size 154003769
|
onnx/decoder_model_merged_bnb4.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:97855771dae403ca85995e892f8bd2f2f4682ff6e93b24e64a32a3fe00c15387
|
3 |
+
size 267960723
|
onnx/decoder_model_merged_fp16.onnx
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8156d8f2c5f8d4609702fec58f2f2c2df54486ff5d87cfbb49b24aebb9a2a563
|
3 |
+
size 307277399
|
onnx/decoder_model_merged_int8.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:83d1e5f1fdd5661b94148c804aedbea39c77eb0a5ae73758fc6f003320ec0650
|
3 |
+
size 154555843
|
onnx/decoder_model_merged_q4.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3c71d077e6fab258359965390299437f859926f0d2d030ffe1de2b187a6b094a
|
3 |
+
size 274251262
|
onnx/decoder_model_merged_q4f16.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8db838d8fede236aa1d0260a81ca6400d85d3b9a909e0384e5f4a4a01c44990e
|
3 |
+
size 162589439
|
onnx/decoder_model_merged_uint8.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:041de5b4af072118bd041bf22eed2683f7eabc9b6073367c7847436009702f90
|
3 |
+
size 154555877
|
onnx/decoder_model_q4.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:52823c5aeb70d7e0c98fef020974f1bdae7a5100055b91a37d90a2c786e30661
|
3 |
+
size 273753226
|
onnx/decoder_model_q4f16.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ebcba13714f46392c25ffc929ec93aeab8c5555e39e8785fa3f49612e9a8a296
|
3 |
+
size 162183948
|
onnx/decoder_model_uint8.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9d6bf6bd93898f26b4b7790d0909b5a83488bee12386432c8689a5f60f2afbf6
|
3 |
+
size 154003803
|
onnx/decoder_with_past_model_bnb4.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2347c236a5268defe2e9c14d38f44a7d1a70fab5bcd5bea05ebb0c7949491567
|
3 |
+
size 260266578
|
onnx/decoder_with_past_model_fp16.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:52b81508257b94e8c06b7d9bafbf6acaf1740e1cde49801d82bcdfbc94fafa5e
|
3 |
+
size 281625975
|
onnx/decoder_with_past_model_int8.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d36a5f736287406bf2631583ce02d172879706d495b58b955495a543d28458e1
|
3 |
+
size 141293069
|
onnx/decoder_with_past_model_q4.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:451bb022f5c54b4d0abf6315087875a9ac7e46cdabb29c7ebf151c789487574d
|
3 |
+
size 265771212
|
onnx/decoder_with_past_model_q4f16.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:327bd2bbfd6ae4f5ac6ac0a2e93d36382cab4edaf83763d5226948f4235862a5
|
3 |
+
size 155017575
|
onnx/decoder_with_past_model_uint8.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:146dfa37f4d4cb47f70d5b9a648fe8a114c24a110c147ed99a0152a20b2ab19f
|
3 |
+
size 141293095
|
onnx/encoder_model_bnb4.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:59af5674b8263f1e689e9434b7f806c0a82efd947b408f82dedcc83219413f0d
|
3 |
+
size 253005757
|
onnx/encoder_model_int8.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:50e6d1485f7332c2318db0e15a1241a2ae9849d262eadf52321eafdd96a05421
|
3 |
+
size 128504308
|
onnx/encoder_model_q4.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2bab6f564e9fbcab7d4f3a565747da359cd357eeaff3e5ed0273d1d412b1365b
|
3 |
+
size 257724055
|
onnx/encoder_model_q4f16.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:525395335b3dc5439885d31dfb6152b32668c9a2b0bd1b444c0bf2e3cd2e18fc
|
3 |
+
size 147800083
|
onnx/encoder_model_uint8.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:22c79187b8b0b6ac38a2343069eddc9c0aaa2cd612d7c827b5ecc19304019958
|
3 |
+
size 128504325
|