Add/update the quantized ONNX model files and README.md for Transformers.js v3

#2
by whitphx HF Staff - opened
README.md CHANGED
@@ -7,4 +7,21 @@ tags:
7
 
8
  https://huggingface.co/facebook/mms-lid-512 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-lid-512 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:** Perform language identification.
18
+
19
+ ```js
20
+ import { pipeline } from '@huggingface/transformers';
21
+
22
+ const classifier = await pipeline('audio-classification', 'Xenova/mms-lid-512');
23
+ const url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/sample.wav';
24
+ const output = await classifier(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:b9858502fd6aceb48dc3c36279ff1ae16550a6c508ff236b6e3282afa94e9cc5
3
+ size 609306027
onnx/model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4bf832c252f5146b85b23ae52a188c9f3d82df145c0657e0b7b8be595961f1ea
3
+ size 669145596
onnx/model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1c9fc2fb0b14365a33ef5cb7bf8d81f2a67ce4087be7aa8140264d4c31eae13e
3
+ size 572559916
onnx/model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3b48e28935ae293b7aba0d646ba58f3137fba284f5f01d7e237db84b39336955
3
+ size 970901356