Xenova HF Staff whitphx HF Staff commited on
Commit
c442e24
·
verified ·
1 Parent(s): e447f93

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


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

README.md CHANGED
@@ -9,14 +9,14 @@ https://huggingface.co/microsoft/dit-base-finetuned-rvlcdip with ONNX weights to
9
 
10
  ## Usage (Transformers.js)
11
 
12
- 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:
13
  ```bash
14
- npm i @xenova/transformers
15
  ```
16
 
17
  **Example:** Perform document image classification with `Xenova/dit-base-finetuned-rvlcdip`
18
  ```js
19
- import { pipeline } from '@xenova/transformers';
20
 
21
  // Create an image classification pipeline
22
  const classifier = await pipeline('image-classification', 'Xenova/dit-base-finetuned-rvlcdip');
@@ -26,8 +26,5 @@ const url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve
26
  const output = await classifier(url);
27
  // [{ label: 'advertisement', score: 0.9035086035728455 }]
28
  ```
29
- ---
30
-
31
-
32
 
33
  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`).
 
9
 
10
  ## Usage (Transformers.js)
11
 
12
+ 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:
13
  ```bash
14
+ npm i @huggingface/transformers
15
  ```
16
 
17
  **Example:** Perform document image classification with `Xenova/dit-base-finetuned-rvlcdip`
18
  ```js
19
+ import { pipeline } from '@huggingface/transformers';
20
 
21
  // Create an image classification pipeline
22
  const classifier = await pipeline('image-classification', 'Xenova/dit-base-finetuned-rvlcdip');
 
26
  const output = await classifier(url);
27
  // [{ label: 'advertisement', score: 0.9035086035728455 }]
28
  ```
 
 
 
29
 
30
  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:81cd39641d4edce4c316deaddf41d1a2284936c5b592c1a6042c408c8ffd8c88
3
+ size 51529927
onnx/model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2acc0c8ce1edd2d0380ceea7f5ce7bdac441a4fd7edcc574b328cb7473d6dc21
3
+ size 56837815
onnx/model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:abee82f60147cb9a584e376bb27d452924db9f07d8c1ca30ae7e7d29b3595506
3
+ size 49758533
onnx/model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4e6af3f147cc08aaa3111426dee718f12dd4ccaa3365d88ad6a29825eb98264b
3
+ size 86967457