Upload README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# hku-nlp/instructor-base
|
| 2 |
+
This is a general embedding model: It maps sentences & paragraphs to a 768 dimensional dense vector space.
|
| 3 |
+
The model was trained on diverse tasks.
|
| 4 |
+
It takes customized instructions and text inputs, and generates task-specific embeddings for general purposes, e.g., information retrieval, classification, clustering, etc.
|
| 5 |
+
```
|
| 6 |
+
git clone https://github.com/HKUNLP/instructor-embedding
|
| 7 |
+
cd sentence-transformers
|
| 8 |
+
pip instal -e .
|
| 9 |
+
```
|
| 10 |
+
Then you can use the model like this:
|
| 11 |
+
```python
|
| 12 |
+
from sentence_transformers import SentenceTransformer
|
| 13 |
+
sentence = "3D ActionSLAM: wearable person tracking in multi-floor environments"
|
| 14 |
+
instruction = "Represent the Science title; Input:"
|
| 15 |
+
model = SentenceTransformer('instructor-large')
|
| 16 |
+
embeddings = model.encode([[instruction,sentence,0]])
|
| 17 |
+
print(embeddings)
|
| 18 |
+
```
|