Sentence Similarity
sentence-transformers
PyTorch
TensorFlow
Rust
ONNX
Safetensors
OpenVINO
Transformers
English
bert
feature-extraction
text-embeddings-inference
Instructions to use mainbrains/all-MiniLM-L6-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use mainbrains/all-MiniLM-L6-v2 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("mainbrains/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 mainbrains/all-MiniLM-L6-v2 with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("mainbrains/all-MiniLM-L6-v2") model = AutoModel.from_pretrained("mainbrains/all-MiniLM-L6-v2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Add maintainer notes and deployment config
Browse files
README.md
CHANGED
|
@@ -35,6 +35,15 @@ pipeline_tag: sentence-similarity
|
|
| 35 |
---
|
| 36 |
|
| 37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
# all-MiniLM-L6-v2
|
| 39 |
This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search.
|
| 40 |
|
|
|
|
| 35 |
---
|
| 36 |
|
| 37 |
|
| 38 |
+
> **Fork maintained by [@mainbrains](https://huggingface.co/mainbrains)** — Using MiniLM for real-time semantic search and embedding pipelines in production RAG systems.
|
| 39 |
+
>
|
| 40 |
+
> **Integration:** ONNX-optimized, running as a sidecar service for document retrieval. ~5ms/query on CPU.
|
| 41 |
+
|
| 42 |
+
---
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
|
| 47 |
# all-MiniLM-L6-v2
|
| 48 |
This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search.
|
| 49 |
|