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 (db1f043aa962a7934a69317f8266f60445b7dce1)
Co-authored-by: Yuichiro Tachibana <whitphx@users.noreply.huggingface.co>
- README.md +3 -4
- onnx/model_bnb4.onnx +3 -0
- onnx/model_int8.onnx +3 -0
- onnx/model_q4.onnx +3 -0
- onnx/model_q4f16.onnx +3 -0
- onnx/model_uint8.onnx +3 -0
README.md
CHANGED
|
@@ -8,15 +8,15 @@ https://huggingface.co/google/electra-small-discriminator with ONNX weights to b
|
|
| 8 |
|
| 9 |
## Usage (Transformers.js)
|
| 10 |
|
| 11 |
-
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/@
|
| 12 |
```bash
|
| 13 |
-
npm i @
|
| 14 |
```
|
| 15 |
|
| 16 |
**Example:** Feature extraction w/ `Xenova/electra-small-discriminator`.
|
| 17 |
|
| 18 |
```javascript
|
| 19 |
-
import { pipeline } from '@
|
| 20 |
|
| 21 |
// Create feature extraction pipeline
|
| 22 |
const extractor = await pipeline('feature-extraction', 'Xenova/electra-small-discriminator');
|
|
@@ -34,5 +34,4 @@ console.log(output)
|
|
| 34 |
|
| 35 |
---
|
| 36 |
|
| 37 |
-
|
| 38 |
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`).
|
|
|
|
| 8 |
|
| 9 |
## Usage (Transformers.js)
|
| 10 |
|
| 11 |
+
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:
|
| 12 |
```bash
|
| 13 |
+
npm i @huggingface/transformers
|
| 14 |
```
|
| 15 |
|
| 16 |
**Example:** Feature extraction w/ `Xenova/electra-small-discriminator`.
|
| 17 |
|
| 18 |
```javascript
|
| 19 |
+
import { pipeline } from '@huggingface/transformers';
|
| 20 |
|
| 21 |
// Create feature extraction pipeline
|
| 22 |
const extractor = await pipeline('feature-extraction', 'Xenova/electra-small-discriminator');
|
|
|
|
| 34 |
|
| 35 |
---
|
| 36 |
|
|
|
|
| 37 |
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:0d678811688b9a15c166507c80890866adbe84e941dd2ebeece02330425e7ef9
|
| 3 |
+
size 21669333
|
onnx/model_int8.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:793a72689fd924bad51c6acd6437d1b4ef8d49babd2308650354f6707e3a4320
|
| 3 |
+
size 13972493
|
onnx/model_q4.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9afdb549407e91b18a11dc969180c8f9bffce7db8d1e4e143a9ea3cb833b0710
|
| 3 |
+
size 22260621
|
onnx/model_q4f16.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d4e32f4e13be42ac318ad06cbda7350836f9f93b0e11db8165012a6d3405b96c
|
| 3 |
+
size 13642810
|
onnx/model_uint8.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fa8e8eb177f9938ed41deff232049c36224407d3f57cd3a1e50ad5937a826fad
|
| 3 |
+
size 13972527
|