Xenova HF Staff whitphx commited on
Commit
beeb2e4
·
verified ·
1 Parent(s): aa981e5

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

Browse files

- Add/update the quantized ONNX model files and README.md for Transformers.js v3 (9fd1d1daf0a73eaa3b2529b3a16a12a33ec0c6e6)


Co-authored-by: Yuichiro Tachibana <whitphx@users.noreply.huggingface.co>

README.md CHANGED
@@ -6,4 +6,20 @@ pipeline_tag: feature-extraction
6
 
7
  https://huggingface.co/sentence-transformers/all-MiniLM-L12-v2 with ONNX weights to be compatible with Transformers.js.
8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  Note: Having a separate repo for ONNX weights is intended to be a temporary solution until WebML gains more traction. If you would like to make your models web-ready, we recommend converting to ONNX using [🤗 Optimum](https://huggingface.co/docs/optimum/index) and structuring your repo like this one (with ONNX weights located in a subfolder named `onnx`).
 
6
 
7
  https://huggingface.co/sentence-transformers/all-MiniLM-L12-v2 with ONNX weights to be compatible with Transformers.js.
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:** Run feature extraction.
17
+
18
+ ```js
19
+ import { pipeline } from '@huggingface/transformers';
20
+
21
+ const extractor = await pipeline('feature-extraction', 'Xenova/all-MiniLM-L12-v2');
22
+ const output = await extractor('This is a simple test.');
23
+ ```
24
+
25
  Note: Having a separate repo for ONNX weights is intended to be a temporary solution until WebML gains more traction. If you would like to make your models web-ready, we recommend converting to ONNX using [🤗 Optimum](https://huggingface.co/docs/optimum/index) and structuring your repo like this one (with ONNX weights located in a subfolder named `onnx`).
onnx/model_bnb4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e916485db069bbd602ef3552551ebff859ef03f17054f105d5535ab9df343651
3
+ size 60147558
onnx/model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ff918e3fb96e9d77b9c63f940011ba9457a80c8145368ff8b1724062dd43ac35
3
+ size 33760847
onnx/model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:60888ec6a75ab82478fb16b45e243a26e8149304dff9bb73ce760480f1f2e080
3
+ size 61474206
onnx/model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ac6e0b5b5e9e328f49423e781df1cb5b742e799ea8439b87b008dcb40b866feb
3
+ size 36190187
onnx/model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:597c3881f7cb587375b62b6d79f6a87ad34f8d69c9cb7b5e068018f6bd393e7c
3
+ size 33760880