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 pytorch_model.bin from BondingAI/all-MiniLM-L12-v2: direct link, hf CLI and curl.
- Browser
- Download file 134 MB
-
https://huggingface.co/BondingAI/all-MiniLM-L12-v2/resolve/main/pytorch_model.bin
- Command line
-
hf download hf://BondingAI/all-MiniLM-L12-v2/pytorch_model.bin
-
curl -L -o pytorch_model.bin https://huggingface.co/BondingAI/all-MiniLM-L12-v2/resolve/main/pytorch_model.bin
134 MB
- Xet hash:
- 02cf2e9b48e13cdc463c37b2f6b04b428c38f1da6b972f9a31d69ad0525463fd
- Size of remote file:
- 134 MB
- SHA256:
- 54609dea3ff88f3167f049eeadbfe780b1173a3117bfac862134ebcd8ce33661
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.