Sentence Similarity
sentence-transformers
PyTorch
Transformers
English
t5
text-embedding
embeddings
information-retrieval
beir
text-classification
language-model
text-clustering
text-semantic-similarity
text-evaluation
prompt-retrieval
text-reranking
feature-extraction
English
Sentence Similarity
natural_questions
ms_marco
fever
hotpot_qa
mteb
Eval Results (legacy)
Instructions to use hkunlp/instructor-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use hkunlp/instructor-base with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("hkunlp/instructor-base") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Transformers
How to use hkunlp/instructor-base with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("hkunlp/instructor-base") model = AutoModel.from_pretrained("hkunlp/instructor-base") - Notebooks
- Google Colab
- Kaggle
Training the model from scratch
#9
by Mohammadreza - opened
First of all, thank you for introducing such a paradigm. It's highly practical. Secondly, I request you to present the architecture of this model as a network class in Hugging Face so we can train this model from scratch on our own data.
Actually, my main need is this: I have a very powerful model and I want to transfer its knowledge, which has come out in the form of embedding, to this model and have it provide me with a task-specific embedding for various tasks.
Hi, you may see the network class here: https://huggingface.co/hkunlp/instructor-base/blob/main/config.json