Xenova HF Staff whitphx HF Staff commited on
Commit
0aa49f9
·
verified ·
1 Parent(s): 7764578

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 (50438f3bb7adc3602be1765e744a6b1b365ef4e6)


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

README.md CHANGED
@@ -6,4 +6,20 @@ pipeline_tag: feature-extraction
6
 
7
  https://huggingface.co/sentence-transformers/multi-qa-distilbert-cos-v1 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/multi-qa-distilbert-cos-v1 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/multi-qa-distilbert-cos-v1');
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:c95dc8aaf471c43d64b74ff8b730046d90b5cf444dc3159692d1588ba1b7cf6c
3
+ size 119594843
onnx/model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f644177af1ffcf15f440f53458dd9792d055fdc229999e764e134dcacfe3dee9
3
+ size 66709270
onnx/model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:844c8912bb5fd3901b68a6bd4d96df6dbcf748874a41d978c76f92553f115228
3
+ size 122248787
onnx/model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6f97726b614a0d5f45905331b4f35728d44ff91b4b8b9625e4dc9a0c7ed82ea7
3
+ size 71803497
onnx/model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d1bc76552764a7b60f483acbbf4e73b1aec7c7d43780960485049eb6877c57b9
3
+ size 66709290