Xenova HF Staff whitphx commited on
Commit
f7f15fc
·
verified ·
1 Parent(s): 505d6dc

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 (c341b233d1094f97ee558ac392f9089047170416)


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

README.md CHANGED
@@ -8,21 +8,26 @@ https://huggingface.co/declare-lab/flan-alpaca-base with ONNX weights to be comp
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/@xenova/transformers) using:
12
  ```bash
13
- npm i @xenova/transformers
14
  ```
15
 
16
  You can then use the model to generate text like this:
17
 
18
  ```js
19
- import { pipeline } from "@xenova/transformers";
20
 
21
  // Create a text2text-generation pipeline
22
  const generator = await pipeline('text2text-generation', 'Xenova/flan-alpaca-base');
23
 
24
  // Generate text
25
- const output = await generator('What is Python?', { max_length: 128, do_sample: true, top_k: 10, });
 
 
 
 
 
26
  console.log(output);
27
  // [{ generated_text: 'Python is a programming language used in many applications, such as machine learning, database management, and graphical application development. It is a multi-functional language which works across various data sets and platforms.' }]
28
  ```
 
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
  You can then use the model to generate text like this:
17
 
18
  ```js
19
+ import { pipeline } from "@huggingface/transformers";
20
 
21
  // Create a text2text-generation pipeline
22
  const generator = await pipeline('text2text-generation', 'Xenova/flan-alpaca-base');
23
 
24
  // Generate text
25
+ const output = await generator('What is Python?', {
26
+ max_length: 128,
27
+ do_sample: true,
28
+ top_k: 10,
29
+ dtype: "fp32" // Options: "fp32", "fp16", "q8", "q4"
30
+ });
31
  console.log(output);
32
  // [{ generated_text: 'Python is a programming language used in many applications, such as machine learning, database management, and graphical application development. It is a multi-functional language which works across various data sets and platforms.' }]
33
  ```
onnx/decoder_model_bnb4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5d0a32a01ffb1b2bca09ef721b2346e54fa756311b9f47d14cdcc91d416788ec
3
+ size 176750910
onnx/decoder_model_fp16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e4005bd386e2b3a674b7f3e330f81ea0516fb0d19c953a9a77e97a56bbfa7fbb
3
+ size 325587745
onnx/decoder_model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c3f2f0cb87ab84b8bb32a98d8e4c7821976c0805f2a929740335d061697c5d7a
3
+ size 163206901
onnx/decoder_model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:56af28d2852a5cb79792bdeb71c040c7eb0b37c5071d492a21128afa288e59dc
3
+ size 185369976
onnx/decoder_model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c91acc15d3630c47b845d3bbb9f4793213a26847166a5a234e74e256f77399c7
3
+ size 127346907
onnx/decoder_model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a5f3a393943f60aed1ec5f1f8006644f85faac6c2ed7c580b0bc375a14b788cd
3
+ size 163206967
onnx/decoder_with_past_model_bnb4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1090ded794d87c0cf9593e6bd61a55024b3d17ec82343774d1aa96f9dd424170
3
+ size 168719484
onnx/decoder_with_past_model_fp16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ac4f5e79b1d321c32a54edfc8aa65110f5b6a7e5abaf24ca082cdff314034680
3
+ size 297221002
onnx/decoder_with_past_model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1be2e37b9df18ad3976118309dd6b666122384f0b0883ba74951d26d923b2b3c
3
+ size 148962712
onnx/decoder_with_past_model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7d867ea94e2042efbffb8b86ce1fb70328a449a4ebaa6b9077a29579f81208e2
3
+ size 176453982
onnx/decoder_with_past_model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0021d69fed422fbee25818f9bdd9ec67f00ab415dc6fb6a73fd85097fd6a5ab0
3
+ size 119325492
onnx/decoder_with_past_model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:344fd86b662a932fe8652ef125114ffbbf90f620e624e9973e5a1238610b6db5
3
+ size 148962767
onnx/encoder_model_bnb4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2d44dd3f1c0474a34a3837f081c04a44d58ce97f67c72171990f9b2c648a4314
3
+ size 146748824
onnx/encoder_model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eb6f189bad0491a0f4fbbb8584805e9fc8c89f45301431f097b98202e2011939
3
+ size 109964299
onnx/encoder_model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c07ab55e013ba6f0000803c310b01b0de15cc647998817f48b602fec8ad77782
3
+ size 152056616
onnx/encoder_model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1fa641e9e3debd517fd389741b910cc2f45484275b4accbd28f0478e0039f69c
3
+ size 97361177
onnx/encoder_model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f644836d17333823436eea7eb2b78161b8cf39e2038e69154177271107f04590
3
+ size 109964347
onnx/model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e1f2a94ccb8e37cff4c90d0daec0ae1fdffcf17e3608fcd18d04e9d4c0775838
3
+ size 651182887
onnx/model_bnb4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eb0f49e6d7d1a5c0c95b921c217663efd1eba510f2ef2cea1f4cc19b86b7aed5
3
+ size 177088140
onnx/model_fp16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:99e1331d3952b51ea8df22501b0d3ddb1fd3393dfa823cb61c5c93a4148ec7bf
3
+ size 325925282
onnx/model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:954a03caeae1ba43d31c7a61643165722792b74f9bb5b5cb8fd10946a87b48b8
3
+ size 163663156
onnx/model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:97f625d2d7db7bd8c44d20f0dc347d118a74aba65d8edd4e58f84202b4a9ce25
3
+ size 185706225
onnx/model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:82059054501e2fe861bf6aa8cf8e4fc319f7a4f81f7037cfdc55b2aa32cfdce1
3
+ size 127699375
onnx/model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:56b0d0ab95cae50d3c71e8fc2f38fb226e1aefb0f1064b5390b6e13e116e5b8d
3
+ size 163663222