|
--- |
|
pipeline_tag: sentence-similarity |
|
language: en |
|
license: apache-2.0 |
|
tags: |
|
- sentence-transformers |
|
- feature-extraction |
|
- sentence-similarity |
|
- transformers |
|
--- |
|
|
|
# hku-nlp/instructor-large |
|
This is a general embedding model: It maps sentences & paragraphs to a 768 dimensional dense vector space. |
|
The model was trained on diverse tasks. |
|
It takes customized instructions and text inputs, and generates task-specific embeddings for general purposes, e.g., information retrieval, classification, clustering, etc. |
|
``` |
|
git clone https://github.com/HKUNLP/instructor-embedding |
|
cd sentence-transformers |
|
pip instal -e . |
|
``` |
|
Then you can use the model like this: |
|
```python |
|
from sentence_transformers import SentenceTransformer |
|
sentence = "3D ActionSLAM: wearable person tracking in multi-floor environments" |
|
instruction = "Represent the Science title; Input:" |
|
model = SentenceTransformer('hku-nlp/instructor-large') |
|
embeddings = model.encode([[instruction,sentence,0]]) |
|
print(embeddings) |
|
``` |