whitphx HF Staff commited on
Commit
5a08e5f
Β·
verified Β·
1 Parent(s): 6d9f62b

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/[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 '/vision_model/embeddings/patch_embedding/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)

### ❌ 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/[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 '/vision_model/embeddings/patch_embedding/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)

### βœ… 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:035fe81679eb75038c1e2a5678b04b7f9afcbefd338bbea819da964c6a010ede
3
+ size 495154514
onnx/model_fp16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:799fd1263e4adbc6cf1a120b5a220ee666e817af152d6333258635da42ce002c
3
+ size 1305981997
onnx/model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:054b0c8badb7dd7c489f9937be20ded307318681da00578b35fc9fb7ce0eb320
3
+ size 533621761
onnx/model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:49866f35bccbd2ca55f2a6dbe9c53791d5c560eae68261176f0315ab1afb21ce
3
+ size 421223485
onnx/model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:be0e5842f8ee20cbdee4fd6a90062a0b4471fbf4fe4727707d950b6a920df395
3
+ size 657630274
onnx/text_model_bnb4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:63329a422fbeb9d6aef93b5340b64e8771f3c60d50dd489e551bdde09db4a173
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:951c700b2ab51bca25c3d589db0838eef9f8d1baa72c09b91587c014f0f1d39b
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:6cd5f6f2dfbeb590afe995b6c3782a63baba7c09c84ea1e03ceaecb6a689f213
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:5745a02970276a42a195f2feacf8cf7a5691888958b6ef638060f458e0593986
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:561f5866443d9e5e8002127d6bba5f979d4b088a5bb214e222ebf8bf094360b9
3
+ size 337846671
onnx/vision_model_bnb4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3c93d772c5fc25751e108e4923e8f8244cdde913e43719125eadb41a80b97e99
3
+ size 187929188
onnx/vision_model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:38e020cf4632e596134e541c1ef494e0e91a0f24e985f9416d58ce0762fa9b7b
3
+ size 319766099
onnx/vision_model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e5c488c4cb7a1e0c3be806834b1cdf00acd5fc1e7ba2def661802ef6e30d13fd
3
+ size 207523243
onnx/vision_model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ad58cbabd1806ba4135611369aa3494cea8a54ca799dfb2cbcdc03129e5b5688
3
+ size 182408722
onnx/vision_model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1190664da4da783b3c13d9030343c736c3004e4c189a498d446f9b281cd27f43
3
+ size 319766165