Sentence Similarity
sentence-transformers
PyTorch
TensorFlow
Rust
ONNX
Safetensors
OpenVINO
Transformers
English
bert
feature-extraction
text-embeddings-inference
Instructions to use RedHatAI/all-MiniLM-L6-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use RedHatAI/all-MiniLM-L6-v2 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("RedHatAI/all-MiniLM-L6-v2") 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 RedHatAI/all-MiniLM-L6-v2 with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("RedHatAI/all-MiniLM-L6-v2") model = AutoModel.from_pretrained("RedHatAI/all-MiniLM-L6-v2") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,7 +1,15 @@
|
|
| 1 |
---
|
| 2 |
language: en
|
| 3 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
library_name: sentence-transformers
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
tags:
|
| 6 |
- sentence-transformers
|
| 7 |
- feature-extraction
|
|
|
|
| 1 |
---
|
| 2 |
language: en
|
| 3 |
license: apache-2.0
|
| 4 |
+
license_name: apache-2.0
|
| 5 |
+
name: RedHatAI/all-MiniLM-L6-v2
|
| 6 |
+
description: This is a sentence-transformers model. It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search.
|
| 7 |
+
readme: https://huggingface.co/RedHatAI/all-MiniLM-L6-v2/main/README.md
|
| 8 |
library_name: sentence-transformers
|
| 9 |
+
provider: SentenceTransformers
|
| 10 |
+
license_link: https://www.apache.org/licenses/LICENSE-2.0
|
| 11 |
+
tasks:
|
| 12 |
+
- embeddings
|
| 13 |
tags:
|
| 14 |
- sentence-transformers
|
| 15 |
- feature-extraction
|