Xenova HF Staff whitphx HF Staff commited on
Commit
370bd76
·
verified ·
1 Parent(s): 1783674

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 (8dd075d9138c097aeb2f6558317564c8208f55ee)


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

README.md CHANGED
@@ -5,4 +5,22 @@ library_name: transformers.js
5
 
6
  https://huggingface.co/google/t5-v1_1-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/t5-v1_1-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/t5-v1_1-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:0a8414f9f5c5c779c20f1ebc5f309567f2d172532757e264dc037b7ab947ae07
3
+ size 176750909
onnx/decoder_model_fp16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1ab8052a514a1d41aa6ea02439336f86112b24fa31e9c2160454a6571d229824
3
+ size 325587744
onnx/decoder_model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5157441f2aa49411f4b1d7a9fe1017a6d9f68616b6500bfc181ca474fd0d31c8
3
+ size 163206900
onnx/decoder_model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9d77bdfa1402a12d7e0596947e438230d500faab2d1d7fb63caffceb1d5af2e8
3
+ size 185369975
onnx/decoder_model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fe4e66acf9bf1630aecf1c4f5b29d92372439d0a7355543e4fc7d271db97ca61
3
+ size 127346906
onnx/decoder_model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:043d9d12e8ec5bdc9b3c5f97d563660eb1d1bc045cafba82c778cfc00ead78a5
3
+ size 163206971
onnx/decoder_with_past_model_bnb4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a233f25f512798736e715e740f678cf07f037b52f37da22e1570f6b12cbb2865
3
+ size 168719807
onnx/decoder_with_past_model_fp16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bc560f5d00f437771d813157169ff7589bd6e5f0a3aa1fa1019e7504914bdcde
3
+ size 297221429
onnx/decoder_with_past_model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:699738b03e5ac6db5f8b86424e32d8ce5a4fda0f3c25f45fe3ab21253fad564b
3
+ size 148963035
onnx/decoder_with_past_model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d0656c3fe8876e4e6594581899b6eaad2fe1e0e53db7606fac5ada5184b5d7e8
3
+ size 176454305
onnx/decoder_with_past_model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:77a8cf13b863afd10b5d671feb39c23c61b26c6ce5cfd4b3fd91fcbfc74bcaec
3
+ size 119325919
onnx/decoder_with_past_model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0533eca2bdc22184a4a12cbe6cd8b88f746a914e34d7f1cb30c3a8caeb4cf32a
3
+ size 148963093
onnx/encoder_model_bnb4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c85ed3e46f31a4d209524249906128ec8d0fd560d59cc5641174b7b2355f0299
3
+ size 146748823
onnx/encoder_model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1728e0d9c02c42460ee84be093d5d3d2281f342b6f029e5b1601917400073492
3
+ size 109964298
onnx/encoder_model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d699817d4af4333654bd8866bf77122dc2612de0f4398c9b46fa335621a5fe48
3
+ size 152056615
onnx/encoder_model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f0d50698070d3027eac38d12c91c4792af9e71d886f28f7917a83565e25722e3
3
+ size 97361176
onnx/encoder_model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7c2278cc092a85e1a3ee0666c5d1f2ae51ac78c2f568f3fa5f2f3945c39f742d
3
+ size 109964346