Xenova HF Staff whitphx HF Staff commited on
Commit
761b726
·
verified ·
1 Parent(s): ae61bf0

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

Browse files

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


Co-authored-by: Yuichiro Tachibana <[email protected]>

README.md CHANGED
@@ -5,4 +5,20 @@ library_name: transformers.js
5
 
6
  https://huggingface.co/intfloat/multilingual-e5-small with ONNX weights to be compatible with Transformers.js.
7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  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`).
 
5
 
6
  https://huggingface.co/intfloat/multilingual-e5-small with ONNX weights to be compatible with Transformers.js.
7
 
8
+ ## Usage (Transformers.js)
9
+
10
+ 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:
11
+ ```bash
12
+ npm i @huggingface/transformers
13
+ ```
14
+
15
+ **Example:** Run feature extraction.
16
+
17
+ ```js
18
+ import { pipeline } from '@huggingface/transformers';
19
+
20
+ const extractor = await pipeline('feature-extraction', 'Xenova/multilingual-e5-small');
21
+ const output = await extractor('This is a simple test.');
22
+ ```
23
+
24
  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:fdb98424bf7e59d7fbd010ea41ba24d343875600ac849d6be22c7cc043101117
3
+ size 397322585
onnx/model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4d24e2bc01a447951524466ef533e52944bf48509e6552810bcee1a2711cb02c
3
+ size 118054593
onnx/model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c5cee25d555ba3ff45b47d50cffd6d9d7842e3b1d21a91f417bc677845469969
3
+ size 398649233
onnx/model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cafab9d10773b6d976e102923b1d98385ac9c7959879d5cff032de3d8adb3b86
3
+ size 204777691
onnx/model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ee13574a23e4384619a172d4c0c8c6b825528fde30258c56130d5e3efcc9c8f1
3
+ size 118054630