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