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-large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use hkunlp/instructor-large with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("hkunlp/instructor-large") 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-large with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("hkunlp/instructor-large") model = AutoModel.from_pretrained("hkunlp/instructor-large") - Notebooks
- Google Colab
- Kaggle
Commit ·
a142c52
1
Parent(s): 5e3a18f
Update README.md
Browse files
README.md
CHANGED
|
@@ -11,7 +11,7 @@ tags:
|
|
| 11 |
|
| 12 |
# hkunlp/instructor-large
|
| 13 |
We introduce **Instructor**👨🏫, an instruction-finetuned text embedding model that can generate text embeddings tailored to any task (e.g., classification, retrieval, clustering, text evaluation, etc.) and domains (e.g., science, finance, etc.) ***by simply providing the task instruction, without any finetuning***. Instructor👨 achieves sota on 70 diverse embedding tasks!
|
| 14 |
-
The model is easy to use with **our customized** `sentence-transformer` library.
|
| 15 |
|
| 16 |
## Quick start
|
| 17 |
<hr />
|
|
@@ -89,4 +89,4 @@ clustering_model = sklearn.cluster.MiniBatchKMeans(n_clusters=2)
|
|
| 89 |
clustering_model.fit(embeddings)
|
| 90 |
cluster_assignment = clustering_model.labels_
|
| 91 |
print(cluster_assignment)
|
| 92 |
-
```
|
|
|
|
| 11 |
|
| 12 |
# hkunlp/instructor-large
|
| 13 |
We introduce **Instructor**👨🏫, an instruction-finetuned text embedding model that can generate text embeddings tailored to any task (e.g., classification, retrieval, clustering, text evaluation, etc.) and domains (e.g., science, finance, etc.) ***by simply providing the task instruction, without any finetuning***. Instructor👨 achieves sota on 70 diverse embedding tasks!
|
| 14 |
+
The model is easy to use with **our customized** `sentence-transformer` library. For more details, check out [our paper](https://arxiv.org/abs/2212.09741) and [project page](https://instructor-embedding.github.io/)!
|
| 15 |
|
| 16 |
## Quick start
|
| 17 |
<hr />
|
|
|
|
| 89 |
clustering_model.fit(embeddings)
|
| 90 |
cluster_assignment = clustering_model.labels_
|
| 91 |
print(cluster_assignment)
|
| 92 |
+
```
|