Xenova HF Staff whitphx HF Staff commited on
Commit
6c6b531
·
verified ·
1 Parent(s): 464c018

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


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

README.md CHANGED
@@ -7,15 +7,15 @@ https://huggingface.co/facebook/dinov2-large-imagenet1k-1-layer with ONNX weight
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/@xenova/transformers) using:
11
  ```bash
12
- npm i @xenova/transformers
13
  ```
14
 
15
  **Example:** Image classification w/ `Xenova/dinov2-base-imagenet1k-1-layer`.
16
 
17
  ```javascript
18
- import { pipeline } from '@xenova/transformers';
19
 
20
  // Create image classification pipeline
21
  const classifier = await pipeline('image-classification', 'Xenova/dinov2-large-imagenet1k-1-layer');
@@ -23,11 +23,10 @@ const classifier = await pipeline('image-classification', 'Xenova/dinov2-large-i
23
  // Classify an image
24
  const url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/cats.jpg';
25
  const output = await classifier(url);
26
- console.log(output)
27
  // [{ label: 'tabby, tabby cat', score: 0.5089695453643799 }]
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`).
 
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:** Image classification w/ `Xenova/dinov2-base-imagenet1k-1-layer`.
16
 
17
  ```javascript
18
+ import { pipeline } from '@huggingface/transformers';
19
 
20
  // Create image classification pipeline
21
  const classifier = await pipeline('image-classification', 'Xenova/dinov2-large-imagenet1k-1-layer');
 
23
  // Classify an image
24
  const url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/cats.jpg';
25
  const output = await classifier(url);
26
+ console.log(output);
27
  // [{ label: 'tabby, tabby cat', score: 0.5089695453643799 }]
28
  ```
29
 
30
  ---
31
 
 
32
  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:ccc7145fd1c5f725d8873fd342f85a0864749fe52cf950961684a5fccac2d0ec
3
+ size 183424523
onnx/model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d2a265fe3bf54e945c38d5786a65d98de4313bdf6c53de81fd6adff38a6e2f11
3
+ size 202297715
onnx/model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2ba1540191be9c1a73abb9921ca2ef55f0e10a7b3e7da33eedcd0fe6a558dce4
3
+ size 176849445
onnx/model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fed0b9f6a590a49b2cbdcf060d3a3fe3c9e54893331ab6e81c22ea8ea9670a31
3
+ size 307755482