Instructions to use dlhw/setFit-fewShot with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use dlhw/setFit-fewShot with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("dlhw/setFit-fewShot") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - setfit
How to use dlhw/setFit-fewShot with setfit:
from setfit import SetFitModel model = SetFitModel.from_pretrained("dlhw/setFit-fewShot") preds = model.predict(["i loved the spiderman movie!", "pineapple on pizza is the worst"]) print(preds) - Notebooks
- Google Colab
- Kaggle
Download model_head.pkl from dlhw/setFit-fewShot: direct link, hf CLI and curl.
- Browser
- Download file 124 kB
-
https://huggingface.co/dlhw/setFit-fewShot/resolve/main/model_head.pkl
- Command line
-
hf download hf://dlhw/setFit-fewShot/model_head.pkl
-
curl -L -o model_head.pkl https://huggingface.co/dlhw/setFit-fewShot/resolve/main/model_head.pkl
124 kB
- Xet hash:
- 430a0ebc3ec484ed09234d299c4f19586eb4e40e9c169ec64619f01cfe6401e0
- Size of remote file:
- 124 kB
- SHA256:
- cf4e4d04bed73db5bec700f181eeda5484bfe0638a0d740289ee45246053c98f
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.