Xenova HF Staff whitphx HF Staff commited on
Commit
64147db
·
verified ·
1 Parent(s): 1e3765b

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 (35074523d0875dfc156646eddd7a1910c269c688)


Co-authored-by: Yuichiro Tachibana <[email protected]>

README.md CHANGED
@@ -5,4 +5,21 @@ library_name: transformers.js
5
 
6
  https://huggingface.co/NbAiLab/nb-whisper-base-beta with ONNX weights to be compatible with Transformers.js.
7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  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`).
 
5
 
6
  https://huggingface.co/NbAiLab/nb-whisper-base-beta with ONNX weights to be compatible with Transformers.js.
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:** Transcribe audio from a URL.
16
+
17
+ ```js
18
+ import { pipeline } from '@huggingface/transformers';
19
+
20
+ const transcriber = await pipeline('automatic-speech-recognition', 'Xenova/nb-whisper-base-beta');
21
+ const url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/jfk.wav';
22
+ const output = await transcriber(url);
23
+ ```
24
+
25
  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:01af6731ed7fc8beba37e6001e4ab448992ecd5764b5942b09d90a09d3aeba94
3
+ size 121779106
onnx/decoder_model_fp16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e3f6c8f192686c5139e9878bedc7684056367de7915117c3ecb242caa7d8b583
3
+ size 104271798
onnx/decoder_model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:edd332aedb03004c9747c34cbc4470def49a141c8029b6368f700be361180377
3
+ size 159408039
onnx/decoder_model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:04776a1171c2c911b8dc160fa6107674f30e987f3cae0d810f8d4fd957723384
3
+ size 123351490
onnx/decoder_model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:25db80f6f7ac3f2f2f5837161e48ff403e07e060774cb535d3e6acca65189917
3
+ size 68104873
onnx/decoder_model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eba13b6df892cf806b135e03226fae2d3b1301d9af99900f7c928510c0f884b4
3
+ size 159408064
onnx/decoder_with_past_model_bnb4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:74152fac0f46f76669d53603feee265fa9438edefc346a17268ef6ff9c973a12
3
+ size 120002734
onnx/decoder_with_past_model_fp16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b9dcad4963ba3815b76aa36bd6d9aaa2c3850cb09dc127d26b598a0faec0a2b8
3
+ size 97985286
onnx/decoder_with_past_model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:986331ad58deec4ca2f792acc0ffee6d090f334735ac689bd976f39213aedb60
3
+ size 156245370
onnx/decoder_with_past_model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8164dfc61c79904caffc2f76c9aa2609b5b7772de7473d1f3ac72789ef271025
3
+ size 121378606
onnx/decoder_with_past_model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ead751b9a875116969425966b23fe5503d97804f7d8055e8e6d82d48119733c1
3
+ size 66338557
onnx/decoder_with_past_model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:421e4c202a757b56861f5186366b5f203685147420a45bb62fbf4aade18f8ba0
3
+ size 156245389
onnx/encoder_model_bnb4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:88451ae2321e66ea77751c8eb942bb3fdf2181c2a95dcd745cd61896ecc60541
3
+ size 17570314
onnx/encoder_model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:518f5b24324309f901f2bca3191554281d7325af8c0d856855cd61f4d4ced243
3
+ size 18749674
onnx/encoder_model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0fb6a7d19c3fd4eff6260079c7cf2f8fbfa3784794a7d1371da66d98fa857570
3
+ size 14138124
onnx/encoder_model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1750ea4ea6b809d4c8f12904a2202c3ae9da5e3f6ed0002718a2ea4a6a34cc90
3
+ size 23132968