Sentence Similarity
sentence-transformers
PyTorch
Transformers
mpnet
feature-extraction
text-embeddings-inference
Instructions to use ilhkn/sentence_classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use ilhkn/sentence_classifier with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("ilhkn/sentence_classifier") 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 ilhkn/sentence_classifier with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("ilhkn/sentence_classifier") model = AutoModel.from_pretrained("ilhkn/sentence_classifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download model_head.pkl from ilhkn/sentence_classifier: direct link, hf CLI and curl.
- Browser
- Download file 56.1 kB
-
https://huggingface.co/ilhkn/sentence_classifier/resolve/main/model_head.pkl
- Command line
-
hf download hf://ilhkn/sentence_classifier/model_head.pkl
-
curl -L -o model_head.pkl https://huggingface.co/ilhkn/sentence_classifier/resolve/main/model_head.pkl
56.1 kB
- Xet hash:
- 0203d29bb0ddc72c3e263c792c4b9fc723aff60d9a63adcae9b63b161ba55845
- Size of remote file:
- 56.1 kB
- SHA256:
- 513df33fa8cb371ae7fe805933c6717fa94c5c3f237084c66654097a68acebaa
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.