binhcode25 commited on
Commit
a2043ec
1 Parent(s): b0fffd1

Add new SentenceTransformer model.

Browse files
Files changed (2) hide show
  1. README.md +20 -3
  2. model_description.json +2 -0
README.md CHANGED
@@ -8,7 +8,7 @@ tags:
8
 
9
  ---
10
 
11
- # baai-bge-base-en-v1
12
 
13
  This is the ONNX version of the Sentence Transformers model BAAI/bge-base-en-v1.5 for sentence embedding, optimized for speed and lightweight performance. By utilizing onnxruntime and tokenizers instead of heavier libraries like sentence-transformers and transformers, this version ensures a smaller library size and faster execution. Below are the details of the model:
14
  - Base model: BAAI/bge-base-en-v1.5
@@ -30,17 +30,34 @@ Using this model becomes easy when you have [LightEmbed](https://pypi.org/projec
30
  pip install -U light-embed
31
  ```
32
 
33
- Then you can use the model like this:
34
 
35
  ```python
36
  from light_embed import TextEmbedding
37
- sentences = ["This is an example sentence", "Each sentence is converted"]
 
 
 
38
 
39
  model = TextEmbedding('BAAI/bge-base-en-v1.5')
40
  embeddings = model.encode(sentences)
41
  print(embeddings)
42
  ```
43
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  ## Citing & Authors
45
 
46
  Binh Nguyen / binhcode25@gmail.com
 
8
 
9
  ---
10
 
11
+ # LightEmbed/baai-bge-base-en-v1.5-onnx
12
 
13
  This is the ONNX version of the Sentence Transformers model BAAI/bge-base-en-v1.5 for sentence embedding, optimized for speed and lightweight performance. By utilizing onnxruntime and tokenizers instead of heavier libraries like sentence-transformers and transformers, this version ensures a smaller library size and faster execution. Below are the details of the model:
14
  - Base model: BAAI/bge-base-en-v1.5
 
30
  pip install -U light-embed
31
  ```
32
 
33
+ Then you can use the model using the original model name like this:
34
 
35
  ```python
36
  from light_embed import TextEmbedding
37
+ sentences = [
38
+ "This is an example sentence",
39
+ "Each sentence is converted"
40
+ ]
41
 
42
  model = TextEmbedding('BAAI/bge-base-en-v1.5')
43
  embeddings = model.encode(sentences)
44
  print(embeddings)
45
  ```
46
 
47
+ Then you can use the model using onnx model name like this:
48
+
49
+ ```python
50
+ from light_embed import TextEmbedding
51
+ sentences = [
52
+ "This is an example sentence",
53
+ "Each sentence is converted"
54
+ ]
55
+
56
+ model = TextEmbedding('LightEmbed/baai-bge-base-en-v1.5-onnx')
57
+ embeddings = model.encode(sentences)
58
+ print(embeddings)
59
+ ```
60
+
61
  ## Citing & Authors
62
 
63
  Binh Nguyen / binhcode25@gmail.com
model_description.json CHANGED
@@ -1,5 +1,7 @@
1
  {
 
2
  "base_model": "BAAI/bge-base-en-v1.5",
 
3
  "embedding_dim": 768,
4
  "max_seq_length": 512,
5
  "model_file_size (GB)": 0.41
 
1
  {
2
+ "model_name": "LightEmbed/baai-bge-base-en-v1.5-onnx",
3
  "base_model": "BAAI/bge-base-en-v1.5",
4
+ "model_file": "model.onnx",
5
  "embedding_dim": 768,
6
  "max_seq_length": 512,
7
  "model_file_size (GB)": 0.41