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 ·
01cfe7c
1
Parent(s): 20071f8
Update README.md
Browse files
README.md
CHANGED
|
@@ -78,7 +78,7 @@ print(retrieved_doc_id)
|
|
| 78 |
## Clustering
|
| 79 |
Use **customized embeddings** for clustering texts in groups.
|
| 80 |
```python
|
| 81 |
-
import sklearn
|
| 82 |
sentences = [['Represent the Medicine sentence for clustering; Input: ','Dynamical Scalar Degree of Freedom in Horava-Lifshitz Gravity', 0],
|
| 83 |
['Represent the Medicine sentence for clustering; Input: ','Comparison of Atmospheric Neutrino Flux Calculations at Low Energies', 0],
|
| 84 |
['Represent the Medicine sentence for clustering; Input: ','Fermion Bags in the Massive Gross-Neveu Model', 0],
|
|
|
|
| 78 |
## Clustering
|
| 79 |
Use **customized embeddings** for clustering texts in groups.
|
| 80 |
```python
|
| 81 |
+
import sklearn.cluster
|
| 82 |
sentences = [['Represent the Medicine sentence for clustering; Input: ','Dynamical Scalar Degree of Freedom in Horava-Lifshitz Gravity', 0],
|
| 83 |
['Represent the Medicine sentence for clustering; Input: ','Comparison of Atmospheric Neutrino Flux Calculations at Low Energies', 0],
|
| 84 |
['Represent the Medicine sentence for clustering; Input: ','Fermion Bags in the Massive Gross-Neveu Model', 0],
|