Xenova HF Staff whitphx HF Staff commited on
Commit
29ac7d2
·
verified ·
1 Parent(s): b2c087b

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


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

README.md CHANGED
@@ -5,4 +5,20 @@ library_name: transformers.js
5
 
6
  https://huggingface.co/EleutherAI/pythia-14m 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/EleutherAI/pythia-14m 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 generation.
16
+
17
+ ```js
18
+ import { pipeline } from '@huggingface/transformers';
19
+
20
+ const generator = await pipeline('text-generation', 'Xenova/pythia-14m');
21
+ const output = await generator('Once upon a time, there was', { max_new_tokens: 10 });
22
+ ```
23
+
24
  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:eb286b2e8a6ed9b4784a088a5d18464762e0876e06bd106fd07da80db502da32
3
+ size 34610621
onnx/decoder_model_fp16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5ba58436f4767bb1069f69b89a25b456743946958623f91ec68e4c5925e5edb7
3
+ size 32596198
onnx/decoder_model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:df50a239c257538cb715ce3b3c19e8a917ae37f944a9a58282a69553ffc78b56
3
+ size 18655677
onnx/decoder_model_merged_bnb4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9a0160e501cbbefac99db5f2601008d79aca261d20e6067ae0dc198fc982ed92
3
+ size 34947687
onnx/decoder_model_merged_fp16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:76786ee56b003058369d5e2d3ea382e20dda1fa576eed00842e1550a4e073583
3
+ size 32932982
onnx/decoder_model_merged_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:373218238fac1b91f888e100ea46437501852c38bf659bef619895f8c516fc2c
3
+ size 19020933
onnx/decoder_model_merged_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7d60eb9d648bdaada4eafc4a26c24c7125de84ccf4f08056d75772701f63a5d3
3
+ size 35423428
onnx/decoder_model_merged_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9758f4d39e60e0c15f1f5d09095a56931d3ad2969a86b1da944f3e31bbfe3812
3
+ size 21988316
onnx/decoder_model_merged_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d71261dac16ef1d1b4a027f77f0938bc39fd3772ccc5589a855b2068332d5658
3
+ size 19020945
onnx/decoder_model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3a025834f41fe02e43f0f50fa10ce8b9dedb996e9ea33aedccbff332101eb1d3
3
+ size 35086587
onnx/decoder_model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5658b7c3795c216b63abe325eb9928f18e0476687677e9e9e5eb3d4d3294469b
3
+ size 21648205
onnx/decoder_model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6ba144de7eece60b55ad2049ed73c2ed133e2216675be3af5b44a68b0ab32851
3
+ size 18655689
onnx/decoder_with_past_model_bnb4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:11196e7d6785b5ad04b71fa40839a869e68d7cadb3839e033a791b5d1883e70d
3
+ size 34638701
onnx/decoder_with_past_model_fp16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f620f6683f2539a8bf9c4757c55686f92fd2b7b48522c3c79f58e65906b84506
3
+ size 32626449
onnx/decoder_with_past_model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a999737a30d247d9c343b255302c899b1dc0c793655a17fa74ac2e42a96539ae
3
+ size 18683757
onnx/decoder_with_past_model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:23df895f28de11920cdf07e81eb589a90144c9ed217917833842c38a538335a6
3
+ size 35114667
onnx/decoder_with_past_model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b207d0939e091af4ad12117dbf6eafcb83a0c0a9f6623e8ad45e1f15609927e3
3
+ size 21678456
onnx/decoder_with_past_model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:627395275ed74ea53194c29dc4ec37c7a5f0dc097f2f3c1ad0dd5a7e5077207c
3
+ size 18683769