whitphx HF Staff commited on
Commit
205c939
·
verified ·
1 Parent(s): 16b03f9

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

Browse files

## Applied Quantizations

### ✅ Based on `model.onnx` *with* slimming

↳ ❌ `int8`: `model_int8.onnx` (added but JS-based E2E test failed)
```
/home/ubuntu/src/tjsmigration/node_modules/.pnpm/[email protected]/node_modules/onnxruntime-node/dist/backend.js:25
__classPrivateFieldGet(this, _OnnxruntimeSessionHandler_inferenceSession, "f").loadModel(pathOrBuffer, options);
^

Error: Could not find an implementation for ConvInteger(10) node with name '/audio_spectrogram_transformer/embeddings/patch_embeddings/projection/Conv_quant'
at new OnnxruntimeSessionHandler (/home/ubuntu/src/tjsmigration/node_modules/.pnpm/[email protected]/node_modules/onnxruntime-node/dist/backend.js:25:92)
at Immediate.<anonymous> (/home/ubuntu/src/tjsmigration/node_modules/.pnpm/[email protected]/node_modules/onnxruntime-node/dist/backend.js:67:29)
at process.processImmediate (node:internal/timers:485:21)

Node.js v22.16.0
```
↳ ✅ `uint8`: `model_uint8.onnx` (added)
↳ ✅ `q4`: `model_q4.onnx` (added)
↳ ✅ `q4f16`: `model_q4f16.onnx` (added)
↳ ✅ `bnb4`: `model_bnb4.onnx` (added)

README.md CHANGED
@@ -8,14 +8,14 @@ https://huggingface.co/MIT/ast-finetuned-audioset-10-10-0.4593 with ONNX weights
8
 
9
  ## Usage (Transformers.js)
10
 
11
- 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/@xenova/transformers) using:
12
  ```bash
13
- npm i @xenova/transformers
14
  ```
15
 
16
  **Example:** Perform audio classification with `Xenova/ast-finetuned-audioset-10-10-0.4593` and return top 4 results.
17
  ```js
18
- import { pipeline } from '@xenova/transformers';
19
 
20
  // Create an audio classification pipeline
21
  const classifier = await pipeline('audio-classification', 'Xenova/ast-finetuned-audioset-10-10-0.4593');
 
8
 
9
  ## Usage (Transformers.js)
10
 
11
+ 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:
12
  ```bash
13
+ npm i @huggingface/transformers
14
  ```
15
 
16
  **Example:** Perform audio classification with `Xenova/ast-finetuned-audioset-10-10-0.4593` and return top 4 results.
17
  ```js
18
+ import { pipeline } from '@huggingface/transformers';
19
 
20
  // Create an audio classification pipeline
21
  const classifier = await pipeline('audio-classification', 'Xenova/ast-finetuned-audioset-10-10-0.4593');
onnx/model_bnb4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b0125fb2d4054952bd05349ab240d939d67625ad0f6dd513d4ceaaa7a94e48ce
3
+ size 54701116
onnx/model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:20f3205b130b111bbc2ebe43247f58b2f786d8c7222325c674d7e35c0a205fad
3
+ size 60009004
onnx/model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:93dda91efb2b0616ca353c0a0b46b4f84d2164f9fbd0af4c9183c16436418a05
3
+ size 51381925
onnx/model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:870d92676e4d5b43eb80895f1478ff767e061407a058d913cbac9a0c16780659
3
+ size 90167734