Sentence Similarity
sentence-transformers
PyTorch
Rust
ONNX
Safetensors
OpenVINO
Transformers
English
bert
feature-extraction
text-embeddings-inference
Instructions to use BondingAI/all-MiniLM-L12-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use BondingAI/all-MiniLM-L12-v2 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("BondingAI/all-MiniLM-L12-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 BondingAI/all-MiniLM-L12-v2 with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("BondingAI/all-MiniLM-L12-v2") model = AutoModel.from_pretrained("BondingAI/all-MiniLM-L12-v2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 381 Bytes
71ef0a8 | 1 2 3 4 5 6 7 8 9 10 | {
"source_repo": "sentence-transformers/all-MiniLM-L12-v2",
"source_revision": "main",
"source_commit": "a50ef00143b4d5391434df20ae11632588ac25be",
"source_url": "https://huggingface.co/sentence-transformers/all-MiniLM-L12-v2/tree/a50ef00143b4d5391434df20ae11632588ac25be",
"source_files": 29,
"source_bytes": 1304218314,
"mirrored_at": "2026-10-29T20:34:40+00:00"
}
|