Views
No views yet
joshuapsa/gpt-generated-news-sentences, which is a synthetic dataset containing news sentences and their topics.python -m pip install setfit1from setfit import SetFitModel
2
3# Download from Hub and run inference
4model = SetFitModel.from_pretrained("joshuapsa/setfit-news-topic-sentences")
5# Run inference
6preds = model(["Tensions escalated in the Taiwan Strait as Chinese and Taiwanese naval vessels engaged in a standoff, raising fears of a potential conflict.",\
7 "Following the highway closure in Toronto, transportation officials announce plans for the construction of additional lanes and improved traffic management systems."])
8# The underlying model body of the setfit model is a SentenceTransformer model, hence you can use it to encode a raw sentence into dense embeddings:
9emb = model.model_body.encode("Your sentence goes here")1@article{https://doi.org/10.48550/arxiv.2209.11055,
2doi = {10.48550/ARXIV.2209.11055},
3url = {https://arxiv.org/abs/2209.11055},
4author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
5keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
6title = {Efficient Few-Shot Learning Without Prompts},
7publisher = {arXiv},
8year = {2022},
9copyright = {Creative Commons Attribution 4.0 International}
10}