Add new SentenceTransformer model.
Browse files- README.md +46 -0
- model.onnx +2 -2
README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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-paraphrase-MiniLM-L6-v2-onnx
|
| 12 |
+
|
| 13 |
+
This is the ONNX version of the Sentence Transformers model sentence-transformers/paraphrase-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/paraphrase-MiniLM-L6-v2
|
| 15 |
+
- Embedding dimension: 384
|
| 16 |
+
- Max sequence length: 128
|
| 17 |
+
- File size on disk: 0.08 GB
|
| 18 |
+
- Pooling incorporated: Yes
|
| 19 |
+
|
| 20 |
+
This ONNX model consists all components in the original sentence transformer model:
|
| 21 |
+
Transformer, Pooling
|
| 22 |
+
|
| 23 |
+
<!--- Describe your model here -->
|
| 24 |
+
|
| 25 |
+
## Usage (LightEmbed)
|
| 26 |
+
|
| 27 |
+
Using this model becomes easy when you have [LightEmbed](https://pypi.org/project/light-embed/) installed:
|
| 28 |
+
|
| 29 |
+
```
|
| 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('sentence-transformers/paraphrase-MiniLM-L6-v2')
|
| 40 |
+
embeddings = model.encode(sentences)
|
| 41 |
+
print(embeddings)
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
## Citing & Authors
|
| 45 |
+
|
| 46 |
+
Binh Nguyen / binhcode25@gmail.com
|
model.onnx
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c4961dfdaafc71253cb2d1f3913ce63404a0c114651d878c9b230fd64302be60
|
| 3 |
+
size 90445395
|