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 (2d4f4c22106f18f22f790735df87c783ff84e78f)
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-large-384-22k-1k with ONNX weights to b
|
|
| 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-large-384-22k-1k`.
|
| 16 |
|
| 17 |
```js
|
| 18 |
-
import { pipeline } from '@
|
| 19 |
|
| 20 |
// Create image classification pipeline
|
| 21 |
const classifier = await pipeline('image-classification', 'Xenova/convnext-large-384-22k-1k');
|
|
@@ -23,7 +23,7 @@ const classifier = await pipeline('image-classification', 'Xenova/convnext-large
|
|
| 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-large-384-22k-1k`.
|
| 16 |
|
| 17 |
```js
|
| 18 |
+
import { pipeline } from '@huggingface/transformers';
|
| 19 |
|
| 20 |
// Create image classification pipeline
|
| 21 |
const classifier = await pipeline('image-classification', 'Xenova/convnext-large-384-22k-1k');
|
|
|
|
| 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:3e7213a69107a8c4d0f1b2070e4be91c61f051361ac52888b5324b2cb211272f
|
| 3 |
+
size 143669654
|
onnx/model_q4.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5c0b63d4234a7fc0d0578cf7297acf858922c63ed25e9a68cff1d602ba8580a7
|
| 3 |
+
size 155447141
|
onnx/model_q4f16.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:835f88220fb791bf833f0518fbb896d578d3c012b76d8f63def14ea5c7b32b8a
|
| 3 |
+
size 125032114
|
onnx/model_uint8.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4c73a9cb6f46f6d2a76f6f5b44df854ca7e264efa734b15603ad967b4fe25c1c
|
| 3 |
+
size 199110337
|