Add/update the quantized ONNX model files and README.md for Transformers.js v3

#3
by whitphx HF Staff - opened
.gitattributes CHANGED
@@ -36,3 +36,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
36
  onnx/decoder_model.onnx_data filter=lfs diff=lfs merge=lfs -text
37
  onnx/decoder_model_merged.onnx_data filter=lfs diff=lfs merge=lfs -text
38
  onnx/decoder_with_past_model.onnx_data filter=lfs diff=lfs merge=lfs -text
 
 
 
36
  onnx/decoder_model.onnx_data filter=lfs diff=lfs merge=lfs -text
37
  onnx/decoder_model_merged.onnx_data filter=lfs diff=lfs merge=lfs -text
38
  onnx/decoder_with_past_model.onnx_data filter=lfs diff=lfs merge=lfs -text
39
+ onnx/decoder_model_fp16.onnx_data filter=lfs diff=lfs merge=lfs -text
40
+ onnx/decoder_with_past_model_fp16.onnx_data filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -5,4 +5,20 @@ library_name: transformers.js
5
 
6
  https://huggingface.co/abacaj/starcoderbase-1b-sft 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/abacaj/starcoderbase-1b-sft 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/starcoderbase-1b-sft');
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:75ce73e1eb46168744152603ca5e277289780b455c9d56fdd261c416ca87d1cd
3
+ size 1112829498
onnx/decoder_model_fp16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3b45e4959ff0e96ee34b429f4d21fa42943bc1b8a935e3c4789f0b0436af44ea
3
+ size 445813
onnx/decoder_model_fp16.onnx_data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1e7da90ff9faac1ccceebd3f6dcb4fa2c16476e4da8f93d69196d86cdc123efc
3
+ size 2341527552
onnx/decoder_model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2fb5506493eaea3a1585a1f7c4dd6bc2a1023365ada4f247959d69491e446c6f
3
+ size 1609164990
onnx/decoder_model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:21b731eae776c45a3c29aace7a998598a415061358f490be51fceeac0bb96588
3
+ size 1176529746
onnx/decoder_model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cdcd2dabaa11ba1a2f99f7c0996592359909e2de533a64d1bd6c6c46adc2d17f
3
+ size 876842721
onnx/decoder_model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f468a5d442299cd448b3b48e91fa4bfb08c516cec24dd99acded557c45768018
3
+ size 1609165033
onnx/decoder_with_past_model_bnb4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0b845fde7e39e74e1dbdfcb92c8f58bb1705134129b29121722052da187f28b4
3
+ size 1112840598
onnx/decoder_with_past_model_fp16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1156f772514e870ee15c40ae684c0b1d70fdfca3ac6f7661cb04645e7fddca34
3
+ size 464777
onnx/decoder_with_past_model_fp16.onnx_data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dd1016345a55f0d04a92cd19e9b0f8124dd0663f28a19e49b4518f702faf58c3
3
+ size 2341527552
onnx/decoder_with_past_model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c9b5a6d102c2d55f4c12771286d3058f1b47fcba735070692a5ea66e550fb6ee
3
+ size 1609176090
onnx/decoder_with_past_model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:28990c1c8f2daf54b17364b280f81e00c713763a07f2f79729e2e933c49351e3
3
+ size 1176540846
onnx/decoder_with_past_model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:80243f60d99d01f635f89fe03db89efb795df82507cdb87c546464f2a87ff555
3
+ size 876858659
onnx/decoder_with_past_model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f6b7238473c11e0a937ae807d9af8fcbb2a2c80f44509054d008bdbda458a526
3
+ size 1609176133