Sentence Similarity
sentence-transformers
Safetensors
xlm-roberta
datadreamer
datadreamer-0.46.0
Synthetic
feature-extraction
text-embeddings-inference
Instructions to use fineinstructions/instruction_template_retrieval_embedding with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use fineinstructions/instruction_template_retrieval_embedding with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("fineinstructions/instruction_template_retrieval_embedding") 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] - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -87,7 +87,9 @@ retriever = InstructionTemplateRetriever(
|
|
| 87 |
)
|
| 88 |
print(json.dumps(retriever.search(document=EXAMPLE_DOC), indent=4))
|
| 89 |
|
| 90 |
-
#
|
|
|
|
|
|
|
| 91 |
|
| 92 |
# Instruction Templates for Entire Document:
|
| 93 |
# - "What's something <fi>a few word description of something remarkable or noteworthy</fi> you can tell me"
|
|
|
|
| 87 |
)
|
| 88 |
print(json.dumps(retriever.search(document=EXAMPLE_DOC), indent=4))
|
| 89 |
|
| 90 |
+
# ******************************************************
|
| 91 |
+
# Retrieval results look like:
|
| 92 |
+
# ******************************************************
|
| 93 |
|
| 94 |
# Instruction Templates for Entire Document:
|
| 95 |
# - "What's something <fi>a few word description of something remarkable or noteworthy</fi> you can tell me"
|