Add/update the quantized ONNX model files and README.md for Transformers.js v3
#1
by
whitphx
HF Staff
- opened
- README.md +3 -6
- 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
|
@@ -7,14 +7,14 @@ https://huggingface.co/alchemab/antiberta2 with ONNX weights to be compatible wi
|
|
| 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:** Masked language modelling with `Xenova/antiberta2`.
|
| 16 |
```js
|
| 17 |
-
import { pipeline } from '@
|
| 18 |
|
| 19 |
// Create a masked language modelling pipeline
|
| 20 |
const pipe = await pipeline('fill-mask', 'Xenova/antiberta2');
|
|
@@ -38,7 +38,4 @@ console.log(output);
|
|
| 38 |
// ]
|
| 39 |
```
|
| 40 |
|
| 41 |
-
|
| 42 |
-
---
|
| 43 |
-
|
| 44 |
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:** Masked language modelling with `Xenova/antiberta2`.
|
| 16 |
```js
|
| 17 |
+
import { pipeline } from '@huggingface/transformers';
|
| 18 |
|
| 19 |
// Create a masked language modelling pipeline
|
| 20 |
const pipe = await pipeline('fill-mask', 'Xenova/antiberta2');
|
|
|
|
| 38 |
// ]
|
| 39 |
```
|
| 40 |
|
|
|
|
|
|
|
|
|
|
| 41 |
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:f8a720d2f02725da513caa28e1b5304f46a2ca6b3f9e7c443eebcdd4462d8d9b
|
| 3 |
+
size 115481304
|
onnx/model_int8.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6d3540287d218f6f5d78371553750bf6c7a33959a3c3a6fee4b5f10644625591
|
| 3 |
+
size 203989366
|
onnx/model_q4.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:50aff4fc5487dd1124fbc61a12ca472a06b4914fae9dc414222a5c8225b01acf
|
| 3 |
+
size 128128960
|
onnx/model_q4f16.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:db956f9af450af42c72191a762de812819296597f6c51adb5e0681fc4c31ea78
|
| 3 |
+
size 114946079
|
onnx/model_uint8.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8c5825f4bb7f7e303267bdb273df1683c95a350cd6f295d30c914593a2e4e4f5
|
| 3 |
+
size 203989416
|