Xenova HF Staff whitphx HF Staff commited on
Commit
ecd862a
·
verified ·
1 Parent(s): 7c4a9bd

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 (02d0066949c27021830567717e3ead1fe91437d6)


Co-authored-by: Yuichiro Tachibana <whitphx@users.noreply.huggingface.co>

README.md CHANGED
@@ -6,4 +6,30 @@ pipeline_tag: summarization
6
 
7
  https://huggingface.co/sshleifer/distilbart-xsum-12-6 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/sshleifer/distilbart-xsum-12-6 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:** Summarization.
17
+
18
+ ```js
19
+ import { pipeline } from '@huggingface/transformers';
20
+
21
+ const generator = await pipeline('summarization', 'Xenova/distilbart-xsum-12-6');
22
+ const text = 'The tower is 324 metres (1,063 ft) tall, about the same height as an 81-storey building, ' +
23
+ 'and the tallest structure in Paris. Its base is square, measuring 125 metres (410 ft) on each side. ' +
24
+ 'During its construction, the Eiffel Tower surpassed the Washington Monument to become the tallest ' +
25
+ 'man-made structure in the world, a title it held for 41 years until the Chrysler Building in New ' +
26
+ 'York City was finished in 1930. It was the first structure to reach a height of 300 metres. Due to ' +
27
+ 'the addition of a broadcasting aerial at the top of the tower in 1957, it is now taller than the ' +
28
+ 'Chrysler Building by 5.2 metres (17 ft). Excluding transmitters, the Eiffel Tower is the second ' +
29
+ 'tallest free-standing structure in France after the Millau Viaduct.';
30
+ const output = await generator(text, {
31
+ max_new_tokens: 100,
32
+ });
33
+ ```
34
+
35
  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:74989215d319e8d5e0482bc9a711ccf65111dc5ab6002b38ddcef34d833262d8
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:61fdba41425d2c5a7843a80d5c8b374814c81478685e78bc2bef6ba44595eecd
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:b4f58752d0c214da727db86b7bc66aff4fe79e1f72f24722422c564e790cb73e
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:abc0d7909278bcfc4391465d6e8b1ac29689d663e2086aa616b75da36185e434
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:e32831bbe1c2ae91aee5c1a956105ab8a7ca4ae5556eb42fec4afb55d88c0daa
3
- size 307422427
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:50c0f2aaded637bef772b9d42754bba2dc72312c7ef5b864347cdb0cfae7c2bb
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:938691832cfc8bd1366858a3e688ce5b3d299e955622b18b68ff6b30974fb985
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:5e169d8773ffdc6ba30470b2a9a537d2c6a6caf5245a85aecb380b41f536aafe
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:b36a3fdb715cfc59fe245a097d86dd32cba6d3e437831eba1188acfa47298699
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:e6c96f18f522288efa6864bb5a5322f5bfbc30d3e7ef2002b4fe41243214f638
3
+ size 154555879
onnx/decoder_model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9db5c3036ed752e534182ad068eb3f2f6cd7454d0a50177ba803423d587395d8
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:5311428c63948730215d9e64c74f6c21fff62c97c71397ffc1840aa6eecf3718
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:06594bfcab2102d012f7f60e6f27ac0d660b79a1917937a4d6c1815e6e60e0b0
3
+ size 154003805
onnx/decoder_with_past_model_bnb4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3a0cf99cf93dba544e9c426d625420143289733680b02744bded15a3c222f88e
3
+ size 260266846
onnx/decoder_with_past_model_fp16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c2dcb166e2b55707f3260210d49b70b7caff9737005927503d3850f9d3173eb6
3
+ size 281626299
onnx/decoder_with_past_model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1a9ce3dafede5281fbdf9a900054711edf1af135b2e4b7543d2b347060e4395f
3
+ size 141293337
onnx/decoder_with_past_model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3382da2166f38e95c248c53af99cf941260cc32484b5838466754558709df652
3
+ size 265771480
onnx/decoder_with_past_model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:feaa18b5cf5813ec486dab1b7ccc3320290e1f2c2920a3253cf7065fac2bc4af
3
+ size 155017899
onnx/decoder_with_past_model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7ba1596e0bce451b2dbcf35ac64c560fc3f12767a7249ae57f7453aadef49bde
3
+ size 141293365
onnx/encoder_model_bnb4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d40e5630221e57e673ea22610f893a75b34021880731372d46c2d1aac6bd913c
3
+ size 295912467
onnx/encoder_model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d304f1422d1e4a418d028e6fbfea39c5cbef90cceec4e37a5ea704ea1897d04f
3
+ size 204472178
onnx/encoder_model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b9fd017b3489a8025c10c8d9973f5cf18ec085ab7d2e6b9aa61f7e4b9927fa0b
3
+ size 305349063
onnx/encoder_model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8bf8d0d2be3ed2027a91840ffe05f73457948da88ee8177ff907549b1a81f52a
3
+ size 190546742
onnx/encoder_model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9ebe9d46358044e69908239d67ccaae2ebf759cdc1ea4c4f76d9e17406ed46fd
3
+ size 204472217