Add/update the quantized ONNX model files and README.md for Transformers.js v3
Browse files## Applied Quantizations
### ❌ Based on `model.onnx` *with* slimming
```
None
```
↳ ❌ `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)
- README.md +3 -3
- onnx/model_bnb4.onnx +3 -0
- onnx/model_q4.onnx +3 -0
- onnx/model_q4f16.onnx +3 -0
- onnx/model_uint8.onnx +3 -0
|
@@ -10,15 +10,15 @@ https://huggingface.co/CIDAS/clipseg-rd64-refined with ONNX weights to be compat
|
|
| 10 |
|
| 11 |
## Usage (Transformers.js)
|
| 12 |
|
| 13 |
-
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/@
|
| 14 |
```bash
|
| 15 |
-
npm i @
|
| 16 |
```
|
| 17 |
|
| 18 |
**Example:** Perform zero-shot image segmentation with a `CLIPSegForImageSegmentation` model.
|
| 19 |
|
| 20 |
```js
|
| 21 |
-
import { AutoTokenizer, AutoProcessor, CLIPSegForImageSegmentation, RawImage } from '@
|
| 22 |
|
| 23 |
// Load tokenizer, processor, and model
|
| 24 |
const tokenizer = await AutoTokenizer.from_pretrained('Xenova/clipseg-rd64-refined');
|
|
|
|
| 10 |
|
| 11 |
## Usage (Transformers.js)
|
| 12 |
|
| 13 |
+
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:
|
| 14 |
```bash
|
| 15 |
+
npm i @huggingface/transformers
|
| 16 |
```
|
| 17 |
|
| 18 |
**Example:** Perform zero-shot image segmentation with a `CLIPSegForImageSegmentation` model.
|
| 19 |
|
| 20 |
```js
|
| 21 |
+
import { AutoTokenizer, AutoProcessor, CLIPSegForImageSegmentation, RawImage } from '@huggingface/transformers';
|
| 22 |
|
| 23 |
// Load tokenizer, processor, and model
|
| 24 |
const tokenizer = await AutoTokenizer.from_pretrained('Xenova/clipseg-rd64-refined');
|
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dd61222b6e990838cebaa82d1c78be614e528fd11d577bf997ec17af3c187fa9
|
| 3 |
+
size 168027790
|
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fe5a0c22a672537ee71f5ba6060a44be626c30a6ab570b97fb615699cdde3591
|
| 3 |
+
size 174887416
|
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6e6fe5ca21b0393f57ab3ee955311f07443c219314d85e378473c98e0f7dec6d
|
| 3 |
+
size 115520184
|
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ddbb836e96a8ad6f17035001a9d44e75fc03523a131c9b129dea74226854d4c5
|
| 3 |
+
size 138145412
|