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 (b2fd0f2f85f834963e7dfa6d556e9183450108e1)
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/convnext-base-224-22k with ONNX weights to be co
|
|
| 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:** Perform image classification with `Xenova/convnext-base-224-22k`.
|
| 16 |
|
| 17 |
```js
|
| 18 |
-
import { pipeline } from '@
|
| 19 |
|
| 20 |
// Create image classification pipeline
|
| 21 |
const classifier = await pipeline('image-classification', 'Xenova/convnext-base-224-22k');
|
|
@@ -23,7 +23,7 @@ const classifier = await pipeline('image-classification', 'Xenova/convnext-base-
|
|
| 23 |
// Classify an image
|
| 24 |
const url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/tiger.jpg';
|
| 25 |
const output = await classifier(url);
|
| 26 |
-
console.log(output)
|
| 27 |
```
|
| 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:** Perform image classification with `Xenova/convnext-base-224-22k`.
|
| 16 |
|
| 17 |
```js
|
| 18 |
+
import { pipeline } from '@huggingface/transformers';
|
| 19 |
|
| 20 |
// Create image classification pipeline
|
| 21 |
const classifier = await pipeline('image-classification', 'Xenova/convnext-base-224-22k');
|
|
|
|
| 23 |
// Classify an image
|
| 24 |
const url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/tiger.jpg';
|
| 25 |
const output = await classifier(url);
|
| 26 |
+
console.log(output);
|
| 27 |
```
|
| 28 |
|
| 29 |
---
|
onnx/model_bnb4.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e8bfb86113d4d5038cce2a039870d48cbed65ddb947fc4ae514b7311280d1088
|
| 3 |
+
size 152299072
|
onnx/model_q4.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f90fbd4db1a8b28f8fae493b619ef5434de087083eb1bbdfd7b60a6d2cec52de
|
| 3 |
+
size 157533181
|
onnx/model_q4f16.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7375a55f9f18b9d6bdd697d0d498bb7c5bb08366e9b3acb255168dfeeb921efa
|
| 3 |
+
size 99901689
|
onnx/model_uint8.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8a667b71eac4aaa2383a104448bbe11e87f1c6fbcba0d83d299167bfb2b1820b
|
| 3 |
+
size 111106244
|