whitphx commited on
Commit
3b75914
Β·
verified Β·
1 Parent(s): 5169e66

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

Browse files

## Applied Quantizations

### βœ… Based on `vision_model.onnx` *with* slimming

↳ βœ… `int8`: `vision_model_int8.onnx` (added)
↳ βœ… `uint8`: `vision_model_uint8.onnx` (added)
↳ βœ… `q4`: `vision_model_q4.onnx` (added)
↳ βœ… `q4f16`: `vision_model_q4f16.onnx` (added)
↳ βœ… `bnb4`: `vision_model_bnb4.onnx` (added)

### βœ… Based on `vision_model.onnx` *with* slimming

↳ βœ… `int8`: `vision_model_int8.onnx` (added)
↳ βœ… `uint8`: `vision_model_uint8.onnx` (added)
↳ βœ… `q4`: `vision_model_q4.onnx` (added)
↳ βœ… `q4f16`: `vision_model_q4f16.onnx` (added)
↳ βœ… `bnb4`: `vision_model_bnb4.onnx` (added)

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

```
None
```
↳ βœ… `fp16`: `model_fp16.onnx` (added)
↳ ❌ `int8`: `model_int8.onnx` (added but JS-based E2E test failed)
```
/home/ubuntu/src/tjsmigration/node_modules/.pnpm/onnxruntime-node@1.21.0/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 '/vision_model/embeddings/patch_embedding/Conv_quant'
at new OnnxruntimeSessionHandler (/home/ubuntu/src/tjsmigration/node_modules/.pnpm/onnxruntime-node@1.21.0/node_modules/onnxruntime-node/dist/backend.js:25:92)
at Immediate.<anonymous> (/home/ubuntu/src/tjsmigration/node_modules/.pnpm/onnxruntime-node@1.21.0/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)

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

```
None
```
↳ βœ… `fp16`: `model_fp16.onnx` (added)
↳ ❌ `int8`: `model_int8.onnx` (added but JS-based E2E test failed)
```
/home/ubuntu/src/tjsmigration/node_modules/.pnpm/onnxruntime-node@1.21.0/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 '/vision_model/embeddings/patch_embedding/Conv_quant'
at new OnnxruntimeSessionHandler (/home/ubuntu/src/tjsmigration/node_modules/.pnpm/onnxruntime-node@1.21.0/node_modules/onnxruntime-node/dist/backend.js:25:92)
at Immediate.<anonymous> (/home/ubuntu/src/tjsmigration/node_modules/.pnpm/onnxruntime-node@1.21.0/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)

### βœ… Based on `text_model.onnx` *with* slimming

↳ βœ… `int8`: `text_model_int8.onnx` (added)
↳ βœ… `uint8`: `text_model_uint8.onnx` (added)
↳ βœ… `q4`: `text_model_q4.onnx` (added)
↳ βœ… `q4f16`: `text_model_q4f16.onnx` (added)
↳ βœ… `bnb4`: `text_model_bnb4.onnx` (added)

### βœ… Based on `text_model.onnx` *with* slimming

↳ βœ… `int8`: `text_model_int8.onnx` (added)
↳ βœ… `uint8`: `text_model_uint8.onnx` (added)
↳ βœ… `q4`: `text_model_q4.onnx` (added)
↳ βœ… `q4f16`: `text_model_q4f16.onnx` (added)
↳ βœ… `bnb4`: `text_model_bnb4.onnx` (added)

onnx/model_bnb4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:25c77e46dacf456873cb5e28d1dbc2a91c5d94770eca7db67d932d034e7cc815
3
+ size 493843792
onnx/model_fp16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:10cd2cc7b7d3f246b75dabf15af6a9a43f68e33d339613f0a6576aa65a4a08b0
3
+ size 1305326637
onnx/model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e13872c9f0704177441ed3b1d4611544d0ea16a2316e61154bbfc717bc27f1a6
3
+ size 532311039
onnx/model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c64eb68b714810cf84e23239510e14ffd504d542c029fc44fdc4c0cba21ed832
3
+ size 420568125
onnx/model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5e0bc16311913bed192e8fbd190f6f3bd812e84a7801230a9912af4aa3c5a60d
3
+ size 656319550
onnx/text_model_bnb4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b53a1f0cf3587a19408351c764ca0c16e76870e5a6db5d8ab6c07036d837de3e
3
+ size 307207015
onnx/text_model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dae2f5ab72ab2a992c7cabd8daf34f7fb55e804b348912f381a066ffd34d25c2
3
+ size 337846603
onnx/text_model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:beebc27035f085dc23ee8dee2ac2de25bc2f827e2536c15a6bbda28223720f47
3
+ size 326080207
onnx/text_model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d64369176f67dee5f5f62bd62385fcb5585659be952348b7bb7de4436651332b
3
+ size 238796521
onnx/text_model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4342d6d37386976e1e756997cca908a6251cb71a6694e4ba8e900d4c8526012a
3
+ size 337846670
onnx/vision_model_bnb4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:17ca4810fc713be787e29e8a2b0d2024eb85767e34577bc0229f5fd919cf7733
3
+ size 186618466
onnx/vision_model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a20f42cb475e14ecf9b98c90fbafd652b12d7732181c7b337c5b16457217edec
3
+ size 318455377
onnx/vision_model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:24a68bfe3989396520e234d633839fb4a360250f75043cc9cdbdbcc19c30cc2e
3
+ size 206212521
onnx/vision_model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:065a05c4bfe1f931dbb807e6619864f55b8283f5a2949cf7439fc75db27c0cea
3
+ size 181753362
onnx/vision_model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:181f600fd6435340a6957910625b8e4558c81a9bd045bde967bbd1613ba87096
3
+ size 318455442