Xenova HF Staff whitphx HF Staff commited on
Commit
ea104da
·
verified ·
1 Parent(s): b72b547

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 (6e950025f83197b4bfed34e654cb236fc6634398)


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

README.md CHANGED
@@ -7,15 +7,15 @@ https://huggingface.co/BAAI/bge-small-en-v1.5 with ONNX weights to be compatible
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/@xenova/transformers) using:
11
  ```bash
12
- npm i @xenova/transformers
13
  ```
14
 
15
  You can then use the model to compute embeddings, as follows:
16
 
17
  ```js
18
- import { pipeline } from '@xenova/transformers';
19
 
20
  // Create a feature-extraction pipeline
21
  const extractor = await pipeline('feature-extraction', 'Xenova/bge-small-en-v1.5');
@@ -40,7 +40,7 @@ console.log(embeddings.tolist()); // Convert embeddings to a JavaScript list
40
 
41
  You can also use the model for retrieval. For example:
42
  ```js
43
- import { pipeline, cos_sim } from '@xenova/transformers';
44
 
45
  // Create a feature-extraction pipeline
46
  const extractor = await pipeline('feature-extraction', 'Xenova/bge-small-en-v1.5');
@@ -76,5 +76,4 @@ console.log(scores);
76
  // ]
77
  ```
78
 
79
-
80
  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`).
 
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
  You can then use the model to compute embeddings, as follows:
16
 
17
  ```js
18
+ import { pipeline } from '@huggingface/transformers';
19
 
20
  // Create a feature-extraction pipeline
21
  const extractor = await pipeline('feature-extraction', 'Xenova/bge-small-en-v1.5');
 
40
 
41
  You can also use the model for retrieval. For example:
42
  ```js
43
+ import { pipeline, cos_sim } from '@huggingface/transformers';
44
 
45
  // Create a feature-extraction pipeline
46
  const extractor = await pipeline('feature-extraction', 'Xenova/bge-small-en-v1.5');
 
76
  // ]
77
  ```
78
 
 
79
  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:4c02225730f532a92f286bbbff7930a90605b871dfedb160cfd091ddfac4460b
3
+ size 60147542
onnx/model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bf64d05457cb391fa88d045faf5927a15ea36d96228ddf23ea970087afdc1197
3
+ size 33760831
onnx/model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f8beecd3ea4f11b9819a1ef3ba157a51b0dc81138a236ac66127dde0b5c295b5
3
+ size 61474190
onnx/model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:60c88c17a3b2da945d10c359b3a1bce90b00a5462c6385240cd9be4fd3d93c0e
3
+ size 36190171
onnx/model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6ec7329d42bc829e909a02d02b044da5271a70af8245417dc31f7ad07a56799c
3
+ size 33760859