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 (67cfbece1284f36180b42f67e8dac365a02ff257)
Co-authored-by: Yuichiro Tachibana <[email protected]>
- README.md +4 -4
- onnx/model_bnb4.onnx +3 -0
- onnx/model_q4.onnx +3 -0
- onnx/model_q4f16.onnx +3 -0
- onnx/model_uint8.onnx +3 -0
README.md
CHANGED
@@ -7,15 +7,15 @@ https://huggingface.co/facebook/dinov2-base-imagenet1k-1-layer with ONNX weights
|
|
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/@
|
11 |
```bash
|
12 |
-
npm i @
|
13 |
```
|
14 |
|
15 |
**Example:** Image classification w/ `Xenova/dinov2-base-imagenet1k-1-layer`.
|
16 |
|
17 |
```javascript
|
18 |
-
import { pipeline } from '@
|
19 |
|
20 |
// Create image classification pipeline
|
21 |
const classifier = await pipeline('image-classification', 'Xenova/dinov2-base-imagenet1k-1-layer', { quantized: false });
|
@@ -23,7 +23,7 @@ const classifier = await pipeline('image-classification', 'Xenova/dinov2-base-im
|
|
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.4475940465927124 }]
|
28 |
```
|
29 |
|
|
|
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-base-imagenet1k-1-layer', { quantized: false });
|
|
|
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.4475940465927124 }]
|
28 |
```
|
29 |
|
onnx/model_bnb4.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d2cd000620140b64e33b704e59ebb9a9e2d413be1802636b6d89419d898ea538
|
3 |
+
size 57291181
|
onnx/model_q4.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cc8df78195990829314eb438f3c47008a6c896fb728092e892dce5b09e285cca
|
3 |
+
size 62599069
|
onnx/model_q4f16.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:03118bdfb86c3394e70f4014de170ca71f3f514088640b28cbd395073d97b13e
|
3 |
+
size 52636289
|
onnx/model_uint8.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e442d72138685c2fcaec4167f9f86f178cfa223c708617b1e55464b881ebdc7c
|
3 |
+
size 88568744
|