Xenova HF Staff whitphx HF Staff commited on
Commit
41995e9
·
verified ·
1 Parent(s): 83d298c

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 (795f0fdc5f9c6ba93eb13d3d8590826736d6a909)


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

README.md CHANGED
@@ -6,4 +6,30 @@ pipeline_tag: summarization
6
 
7
  https://huggingface.co/facebook/bart-large-xsum 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/facebook/bart-large-xsum 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/bart-large-xsum');
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:8793af5d29853c6d9aa82bb5627bff7cfe12d99ec1ccdf7b0b73a564d7540c83
3
+ size 324819020
onnx/decoder_model_fp16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b917d0b9973cf7b370a54dc3696618405bb473cf927dc6150cd9c439390a065f
3
+ size 508696917
onnx/decoder_model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ee0118a97f0c9fa018b053e545318e777989e9a9afaa1917d28f342edf64531e
3
+ size 255464148
onnx/decoder_model_merged_bnb4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ad35cf77ca8e165e9d87756f71a37b87e716019d95eb350481d145b61ae3f8da
3
+ size 325603874
onnx/decoder_model_merged_fp16.onnx CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:dad4cdf19d1e04290080da477c8fadb9d5b7b2060a609ab5ce82abd948eca4df
3
- size 509661023
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3848e608fa805041c20017fc8df6bace402c0a69903a0d06a5d74b4084a77d8f
3
+ size 509382753
onnx/decoder_model_merged_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:46bf98966f20ceeb0d60cce6ab7bf39ed8293f2fc59df81fa4675d2b39d8f168
3
+ size 256355663
onnx/decoder_model_merged_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b7b70d5383c5e09ae99e3755e0be213ac3455ab4f68bf5f6b985bf7a3b08bef8
3
+ size 338184950
onnx/decoder_model_merged_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:629188db2253a7cb90e7beec31fdd635d7bb50ffc60a399935e6bf35d28ffadb
3
+ size 220006815
onnx/decoder_model_merged_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:88e71d9ee02e4f99a34b97fe819e499ed9c710f6a922e433c9afa3b39a7a28c4
3
+ size 256355726
onnx/decoder_model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1ddccc4389387358f45268446973a4b257ba8308cad7485355c69eb9bfd7f846
3
+ size 337400960
onnx/decoder_model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a5cb3d977bd161a5a1fd79e14e9f0b9473aa6513210244ed4c00a7d85c618b69
3
+ size 219307779
onnx/decoder_model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:efdd0da64d995efa5ce562be5619144863b910fba44017672052ada7452a01d2
3
+ size 255464211
onnx/decoder_with_past_model_bnb4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f5888174ba2ea86662772638498b103b3e7fe227b561ca413159ca49bd6968c9
3
+ size 310431387
onnx/decoder_with_past_model_fp16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7f4ce7684619b62af68f575d9976e9db5187066296332261c82d4af168ab7a1f
3
+ size 458195908
onnx/decoder_with_past_model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0509adf6a23490273da94d94b8e69ff77bd8070c7905b5e8e033117d4a4411cc
3
+ size 230046616
onnx/decoder_with_past_model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7e0b3face83a1f0635b8b5b8f52875854a381ce8212384110826fdfd7bc200bc
3
+ size 321440655
onnx/decoder_with_past_model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a110ee6120c91cf3c339a7b0e2e19e2a625c734f8f891999df26f0b467f391a8
3
+ size 204979090
onnx/decoder_with_past_model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bedb99b06a2367ba6b32a7800396195f657cff856a72dc635735486728d4e3d5
3
+ size 230046667
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