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
Download MIRROR_INFO.json from BondingAI/all-MiniLM-L12-v2: direct link, hf CLI and curl.
- Browser
- Download file 381 Bytes
-
https://huggingface.co/BondingAI/all-MiniLM-L12-v2/resolve/main/MIRROR_INFO.json
- Command line
-
hf download hf://BondingAI/all-MiniLM-L12-v2/MIRROR_INFO.json
-
curl -L -o MIRROR_INFO.json https://huggingface.co/BondingAI/all-MiniLM-L12-v2/resolve/main/MIRROR_INFO.json
381 Bytes
| { | |
| "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" | |
| } | |