Xenova HF Staff whitphx HF Staff commited on
Commit
4cbc731
·
verified ·
1 Parent(s): cfe49a7

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 (a0880bddca7665b840c1097953cc192b64d2ea6e)


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

README.md CHANGED
@@ -7,4 +7,21 @@ tags:
7
 
8
  https://huggingface.co/facebook/mms-1b-l1107 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-l1107 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-l1107');
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:efa64901767a652a3dc1f8976cc4bf600e44177bace2ef7981cd18b23415979b
3
+ size 607333198
onnx/model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a8bb98214e9ab8ed451885a1e1e6caf2d5851ff40fb33a8cf662780efeb3c440
3
+ size 667094286
onnx/model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cd798bb5ad05120867cd52a8f59c18d418f377e5c08fb291dceae9b625922dff
3
+ size 571268374
onnx/model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:62408a3c2a0f923a0159648a0f347d016a0397c767feb2bd151bcca590cae764
3
+ size 969952595