Xenova HF Staff whitphx HF Staff commited on
Commit
2e9a6fe
·
verified ·
1 Parent(s): a4f6cd4

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


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

README.md CHANGED
@@ -5,4 +5,20 @@ library_name: transformers.js
5
 
6
  https://huggingface.co/pythainlp/thainer-corpus-v2-base-model 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/pythainlp/thainer-corpus-v2-base-model 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:** Perform named entity recognition.
16
+
17
+ ```js
18
+ import { pipeline } from '@huggingface/transformers';
19
+
20
+ const classifier = await pipeline('token-classification', 'Xenova/thainer-corpus-v2-base-model');
21
+ const output = await classifier('My name is Sarah and I live in London');
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/model_bnb4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1829fce453add461867d57173068342242e6d79c25615a8818edf123989d46b4
3
+ size 126994593
onnx/model_fp16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:adfe6442cbf737181048973077bb8b0d60f61da4685dbd1093891bb415ac8518
3
+ size 209678228
onnx/model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:05c1bdf21e0e0543596f6b5e9340e162320f616bc335b0edc930fc2bcc4f0427
3
+ size 105458484
onnx/model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6115e991a4e4d63822da75731a7f1bb12ecfd2ff859ad2aca69cc016905a1c32
3
+ size 132304201
onnx/model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1a93ab840d42716e5051f27f93bba3a3a2f4e51ea27e05d6ab4b10bc3f1e8ee2
3
+ size 87555831
onnx/model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:de499a0119f0370625d3babdf4b606529cc9309948cafac7c78b87b1bf82efde
3
+ size 105458523