binhcode25
commited on
Commit
•
132ae0e
1
Parent(s):
c0d3062
Add new SentenceTransformer model.
Browse files- README.md +45 -0
- config.json +1 -1
- model_description.json +6 -0
- model_descriptions.json +6 -0
README.md
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: light-embed
|
3 |
+
pipeline_tag: sentence-similarity
|
4 |
+
tags:
|
5 |
+
- sentence-transformers
|
6 |
+
- feature-extraction
|
7 |
+
- sentence-similarity
|
8 |
+
|
9 |
+
---
|
10 |
+
|
11 |
+
# sbert-all-MiniLM-L6-v2-onnx
|
12 |
+
|
13 |
+
This is the ONNX version of the Sentence Transformers model sentence-transformers/all-MiniLM-L6-v2 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: sentence-transformers/all-MiniLM-L6-v2
|
15 |
+
- Embedding dimension: 384
|
16 |
+
- Max sequence length: 256
|
17 |
+
- File size on disk: 0.08 GB
|
18 |
+
|
19 |
+
This ONNX model consists all components in the original sentence transformer model:
|
20 |
+
Transformer, Pooling, Normalize
|
21 |
+
|
22 |
+
<!--- Describe your model here -->
|
23 |
+
|
24 |
+
## Usage (LightEmbed)
|
25 |
+
|
26 |
+
Using this model becomes easy when you have [LightEmbed](https://www.light-embed.net) installed:
|
27 |
+
|
28 |
+
```
|
29 |
+
pip install -U light-embed
|
30 |
+
```
|
31 |
+
|
32 |
+
Then you can use the model like this:
|
33 |
+
|
34 |
+
```python
|
35 |
+
from light_embed import TextEmbedding
|
36 |
+
sentences = ["This is an example sentence", "Each sentence is converted"]
|
37 |
+
|
38 |
+
model = TextEmbedding('sentence-transformers/all-MiniLM-L6-v2')
|
39 |
+
embeddings = model.encode(sentences)
|
40 |
+
print(embeddings)
|
41 |
+
```
|
42 |
+
|
43 |
+
## Citing & Authors
|
44 |
+
|
45 |
+
Binh Nguyen / [email protected]
|
config.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
{
|
2 |
-
"_name_or_path": "
|
3 |
"architectures": [
|
4 |
"BertModel"
|
5 |
],
|
|
|
1 |
{
|
2 |
+
"_name_or_path": "sentence-transformers/all-MiniLM-L6-v2",
|
3 |
"architectures": [
|
4 |
"BertModel"
|
5 |
],
|
model_description.json
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"base_model": "sentence-transformers/all-MiniLM-L6-v2",
|
3 |
+
"embedding_dim": 384,
|
4 |
+
"max_seq_length": 256,
|
5 |
+
"model_file_size (GB)": 0.08
|
6 |
+
}
|
model_descriptions.json
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"base_model": "sentence-transformers/all-MiniLM-L6-v2",
|
3 |
+
"embedding_dim": 384,
|
4 |
+
"max_seq_length": 256,
|
5 |
+
"model_file_size (GB)": 0.08
|
6 |
+
}
|