Add/update the quantized ONNX model files and README.md for Transformers.js v3
#1
by
whitphx
HF Staff
- opened
- README.md +20 -1
- onnx/decoder_model_bnb4.onnx +3 -0
- onnx/decoder_model_fp16.onnx +3 -0
- onnx/decoder_model_int8.onnx +3 -0
- onnx/decoder_model_q4.onnx +3 -0
- onnx/decoder_model_q4f16.onnx +3 -0
- onnx/decoder_model_quantized.onnx +3 -0
- onnx/decoder_model_uint8.onnx +3 -0
- onnx/decoder_with_past_model_bnb4.onnx +3 -0
- onnx/decoder_with_past_model_fp16.onnx +3 -0
- onnx/decoder_with_past_model_int8.onnx +3 -0
- onnx/decoder_with_past_model_q4.onnx +3 -0
- onnx/decoder_with_past_model_q4f16.onnx +3 -0
- onnx/decoder_with_past_model_quantized.onnx +3 -0
- onnx/decoder_with_past_model_uint8.onnx +3 -0
- onnx/encoder_model_bnb4.onnx +3 -0
- onnx/encoder_model_fp16.onnx +3 -0
- onnx/encoder_model_q4.onnx +3 -0
- onnx/encoder_model_q4f16.onnx +3 -0
- onnx/encoder_model_quantized.onnx +3 -0
- onnx/encoder_model_uint8.onnx +3 -0
README.md
CHANGED
@@ -30,4 +30,23 @@ Followed by:
|
|
30 |
$ mkdir -p ./converted/onnx
|
31 |
$ optimum-cli export onnx -m ./converted ./converted/onnx --task automatic-speech-recognition-with-past
|
32 |
$ find ./converted/onnx -type f ! -name "*.onnx" -delete
|
33 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
$ mkdir -p ./converted/onnx
|
31 |
$ optimum-cli export onnx -m ./converted ./converted/onnx --task automatic-speech-recognition-with-past
|
32 |
$ find ./converted/onnx -type f ! -name "*.onnx" -delete
|
33 |
+
```
|
34 |
+
|
35 |
+
## Usage (Transformers.js)
|
36 |
+
|
37 |
+
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:
|
38 |
+
```bash
|
39 |
+
npm i @huggingface/transformers
|
40 |
+
```
|
41 |
+
|
42 |
+
**Example:** Transcribe audio from a URL.
|
43 |
+
|
44 |
+
```js
|
45 |
+
import { pipeline } from '@huggingface/transformers';
|
46 |
+
|
47 |
+
const transcriber = await pipeline('automatic-speech-recognition', 'Xenova/tiny-random-WhisperForConditionalGeneration');
|
48 |
+
const url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/jfk.wav';
|
49 |
+
const output = await transcriber(url);
|
50 |
+
```
|
51 |
+
|
52 |
+
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/decoder_model_bnb4.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:81485ae3c6b054ffb3d507924791a6fe9094601c76a9bb0b81e54df24ba1e03d
|
3 |
+
size 3428388
|
onnx/decoder_model_fp16.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3c003f00f7164a10038c803b71f0767e42342343805c44d3ec3f1faf126990dd
|
3 |
+
size 1823722
|
onnx/decoder_model_int8.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:acd04dbfd1f482a428b71fe3da7ebec2a9468bfbf2c5cbc29f842f060b45f1d3
|
3 |
+
size 4291748
|
onnx/decoder_model_q4.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:eceb9f9a648aa50754f176d2197d9e1675e3dd0152b37934e429546b020b17d2
|
3 |
+
size 3448151
|
onnx/decoder_model_q4f16.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:86a710b39b7b5d16420546c4c1a35b53108d2451f1195be717a394a70e5977d5
|
3 |
+
size 1766532
|
onnx/decoder_model_quantized.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:acd04dbfd1f482a428b71fe3da7ebec2a9468bfbf2c5cbc29f842f060b45f1d3
|
3 |
+
size 4291748
|
onnx/decoder_model_uint8.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dcfa293f7781fd1dd3694d0e265aaeaa3a87eb0e1fd785b56cd39e91dd59a73b
|
3 |
+
size 4291752
|
onnx/decoder_with_past_model_bnb4.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:37b1461a8fd1d03e0bf5c26ba3c1ce4c5472ec78305f77fee3740b9914032a61
|
3 |
+
size 3424053
|
onnx/decoder_with_past_model_fp16.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:71d6b63fe5eee380cbeb122c63262f8a681de914fd5047cf08cf45a9d1457466
|
3 |
+
size 1819524
|
onnx/decoder_with_past_model_int8.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7a290d76c2c027373b879c56d39bab39901c0572b07e31d0104a93b87a6acd88
|
3 |
+
size 4285379
|
onnx/decoder_with_past_model_q4.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1c7380f8730cd9494d3d3459f1b2d72887918233dd903295e17195669d183695
|
3 |
+
size 3443480
|
onnx/decoder_with_past_model_q4f16.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:879b16446c549c54dbd4db86828b8ac44febe677f9a6db5e0e1800a937a97740
|
3 |
+
size 1762500
|
onnx/decoder_with_past_model_quantized.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7a290d76c2c027373b879c56d39bab39901c0572b07e31d0104a93b87a6acd88
|
3 |
+
size 4285379
|
onnx/decoder_with_past_model_uint8.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ddf116419d0d006277b2e090b5b32a985695b237b3847ae8cb5a69bf64750c0d
|
3 |
+
size 4285382
|
onnx/encoder_model_bnb4.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f7ac6443b8ba3e6f867531caf1f221dad14d3b04cc01c8c5766227ffd57c5dee
|
3 |
+
size 164055
|
onnx/encoder_model_fp16.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4510235e1971b99fb006d9f2a98ab24ccf0097d833730595f3ff4bddfade6136
|
3 |
+
size 175123
|
onnx/encoder_model_q4.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8cbb12227211d6b6d010630b76172414483fa7754f9329606172608282ef5d05
|
3 |
+
size 183146
|
onnx/encoder_model_q4f16.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9d298f80e4b73ed1e1fccfaa768fd61d5c091a25694ee206e3888123fd8835df
|
3 |
+
size 118267
|
onnx/encoder_model_quantized.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4bef6c4fc345e5a18c95ac506d13413f35054c0850f3a2a0caa05585acb10a71
|
3 |
+
size 179431
|
onnx/encoder_model_uint8.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4bef6c4fc345e5a18c95ac506d13413f35054c0850f3a2a0caa05585acb10a71
|
3 |
+
size 179431
|