Add/update the quantized ONNX model files and README.md for Transformers.js v3 (#2)
Browse files- Add/update the quantized ONNX model files and README.md for Transformers.js v3 (a9ca686997b270364a3c83f7aa1e5a104707f152)
Co-authored-by: Yuichiro Tachibana <whitphx@users.noreply.huggingface.co>
- README.md +17 -0
- 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,4 +7,21 @@ tags:
|
|
| 7 |
|
| 8 |
https://huggingface.co/facebook/mms-1b-all with ONNX weights to be compatible with Transformers.js.
|
| 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
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 |
https://huggingface.co/facebook/mms-1b-all with ONNX weights to be compatible with Transformers.js.
|
| 9 |
|
| 10 |
+
## Usage (Transformers.js)
|
| 11 |
+
|
| 12 |
+
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:
|
| 13 |
+
```bash
|
| 14 |
+
npm i @huggingface/transformers
|
| 15 |
+
```
|
| 16 |
+
|
| 17 |
+
**Example:** Transcribe audio from a URL.
|
| 18 |
+
|
| 19 |
+
```js
|
| 20 |
+
import { pipeline } from '@huggingface/transformers';
|
| 21 |
+
|
| 22 |
+
const transcriber = await pipeline('automatic-speech-recognition', 'Xenova/mms-1b-all');
|
| 23 |
+
const url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/jfk.wav';
|
| 24 |
+
const output = await transcriber(url);
|
| 25 |
+
```
|
| 26 |
+
|
| 27 |
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:910af971c9d5d1dd6558685c2fff85ca225861ddc3028e50c68b3e64aa07d0da
|
| 3 |
+
size 607413567
|
onnx/model_q4.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:af376be2258842121eeaec581c10e950258bae1fd576e289910f79abaf6ea30b
|
| 3 |
+
size 667183538
|
onnx/model_q4f16.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e3fd78a9003d2758210567e310952dda81eb7446d6c72b088bca410f8b8cbc2d
|
| 3 |
+
size 571348523
|
onnx/model_uint8.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8af094a8268eddff5ce9e8e096bb514033f97d7b7d88145dd8e39b18bcbc867e
|
| 3 |
+
size 970095124
|