SetFit/test-setfit-sst2-string-labels
02.8k
1---2license: apache-2.03tags:4- setfit5- sentence-transformers6- text-classification7pipeline_tag: text-classification8---9 10# SetFit/test-setfit-string-labels11 12**NOTE**: This model exists only for test cases in the SetFit repository, it was not trained to be strong.13 14This is a [SetFit model](https://github.com/huggingface/setfit) that can be used for text classification. The model has been trained using an efficient few-shot learning technique that involves:15 161. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.172. Training a classification head with features from the fine-tuned Sentence Transformer.18 19## Usage20 21To use this model for inference, first install the SetFit library:22 23```bash24python -m pip install setfit25```26 27You can then run inference as follows:28 29```python30from setfit import SetFitModel31 32# Download from Hub and run inference33model = SetFitModel.from_pretrained("SetFit/test-setfit-string-labels")34# Run inference35preds = model(["i loved the spiderman movie!", "pineapple on pizza is the worst 🤮"])36```37 38## BibTeX entry and citation info39 40```bibtex41@article{https://doi.org/10.48550/arxiv.2209.11055,42 doi = {10.48550/ARXIV.2209.11055},43 url = {https://arxiv.org/abs/2209.11055},44 author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},45 keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},46 title = {Efficient Few-Shot Learning Without Prompts},47 publisher = {arXiv},48 year = {2022},49 copyright = {Creative Commons Attribution 4.0 International}50}51```52 