hku-nlp/instructor-base
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:
from sentence_transformers import SentenceTransformer
sentence = "3D ActionSLAM: wearable person tracking in multi-floor environments"
instruction = "Represent the Science title; Input:"
model = SentenceTransformer('instructor-large')
embeddings = model.encode([[instruction,sentence,0]])
print(embeddings)