whitphx HF Staff commited on
Commit
2aff3f1
·
verified ·
1 Parent(s): e376161

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 '/backbone/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,15 +8,15 @@ https://huggingface.co/LiheYoung/depth-anything-large-hf with ONNX weights to be
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:** Depth estimation with `Xenova/depth-anything-large-hf`.
17
 
18
  ```js
19
- import { pipeline } from '@xenova/transformers';
20
 
21
  // Create depth-estimation pipeline
22
  const depth_estimator = await pipeline('depth-estimation', 'Xenova/depth-anything-large-hf');
 
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:** Depth estimation with `Xenova/depth-anything-large-hf`.
17
 
18
  ```js
19
+ import { pipeline } from '@huggingface/transformers';
20
 
21
  // Create depth-estimation pipeline
22
  const depth_estimator = await pipeline('depth-estimation', 'Xenova/depth-anything-large-hf');
onnx/model_bnb4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1fed68945a33ec3b3fb4f9dc310677463d62bd68afff9cfcf359708ff5e673e1
3
+ size 299159683
onnx/model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7ae12d6f38f08d3cec630c24f3ec0165b19b1c8209b10e0a93fd558ec7e487e9
3
+ size 318032875
onnx/model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3b56aa224ce98de320788d56f90dc5408584b53ee9b2d793a040cb483643c138
3
+ size 237676240
onnx/model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7a91baee35aecc5dbd75f33e9a601644ad4c55fbc2f6b2aea6115aedd74bc1ff
3
+ size 346717101