Sentence Similarity
sentence-transformers
PyTorch
TensorFlow
Rust
ONNX
Safetensors
OpenVINO
Transformers
English
bert
feature-extraction
text-embeddings-inference
Instructions to use unsloth/all-MiniLM-L6-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use unsloth/all-MiniLM-L6-v2 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("unsloth/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 unsloth/all-MiniLM-L6-v2 with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("unsloth/all-MiniLM-L6-v2") model = AutoModel.from_pretrained("unsloth/all-MiniLM-L6-v2") - Notebooks
- Google Colab
- Kaggle
- Xet hash:
- 0353ba4f7ac86a0d271d7a66299f990cf9ba26e8503b02b90a193db97278d085
- Size of remote file:
- 91 MB
- SHA256:
- 24c06a7429b843d46e40c6b167122053921bf94dce2e5550ea5c07fabc597646
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.