--- base_model: BAAI/bge-small-en-v1.5 library_name: setfit metrics: - accuracy pipeline_tag: text-classification tags: - setfit - sentence-transformers - text-classification - generated_from_setfit_trainer widget: - text: 'AHMEDABAD: Cross complaints were filed at Odhav police station on Wednesday alleging assault and verbal abusive over a a loan repayment dispute. In the first complaint, Anil Purohit, a resident of Nikol, said that his father Vasnaram had taken a business and personal loan from a private finance company. He said that as they were irregular in repayments, Nitin Rabari, Bharat Rabari, Shambu Rabari and Nimesh Desai, all residents of Ghatlodia, came to his residence in Odhav. The complainant said his father asked for time to repay the loan, but the four abused and assaulted his father. He then called the police control room and lodged a complaint against the four. In the cross complaint, Nitin Rabari stated that Anil Purohit, Mahendra Purohit and Vasnaram Purohit attacked him and his other members of the recovery party. He said Vasnaram had taken a loan three years ago and was not regular in paying the instalments. On Wednesday, when he and the others went to recover their money, the three assaulted them, abused them and damaged their mobile phones.' - text: paolo - our new gig is famous football stadiums. the dj admitted however that his massive worldwide success had a downside with intense media interest in his personal life. in particular he said he had struggled to cope with tabloid intrusion during the temporary break-up of his marriage to radio one presenter zoe ball after she was linked with dj dan peppe. the tabloid thing has been difficult at times cook said. especially the me-and-zoe-gate - it s quite scary. he said that he had been determined that what had happened with ball did not affect the album. at first i was doing deliberately jolly tunes so that people wouldn t think i was depressed he explained. then i thought that s not right . and he highlighted a bizarre coincidence - that one song written before they split had turned out to have a great deal more meaning than intended. i said to zoe i did this track called my masochistic baby went and left me do you mind if it s on the album he recalled. she said yeah it s hilarious because your masochistic baby did leave you . cook also added that he had some ways of coping with the intense paparazzi pressure which accumulates at the end of the private road he lives on - where paul mccartney is a neighbour. it s almost like prisoners rattling the bars with their mugs cook explained. if there s a pap at the end of the road everyone knocks on each other s doors - paul comes round and we warn him because we don t know who they re after. - text: "of Michigan, drug giants Pfizer and Stryker are two of the largest employers.\ \ But ABC News looked into his bill and there were no provisions to allow Medicare\ \ to negotiate lower prices. Uptonâ\x80\x99s office did not return ABC Newsâ\x80\ \x99 request for further comment. As for Andre, her insurance company changed\ \ its mind after ABC News became involved, and now says it will cover Andre for\ \ her Hepatitis C medication. â\x80\x9CThere was an email sent out wanting to\ \ know when the taping was and when it was going to air,â\x80? Andre said. â\x80\ \x9CAll of a sudden, I got a phone call, Iâ\x80\x99m approved, my prescription\ \ is ready, all this stuff, Iâ\x80\x99m like yes, this is amazing.â\x80? Her insurance\ \ company told ABC News in a statement that â\x80\x9Cthe benefits of prescribing\ \ Harvoni for women of child-bearing age potential...outweigh the risks and we\ \ have revised our coverage policy.â\x80? Andre did finally receive the medication,\ \ and just last week she was told she no longer has Hepatitis C. But unlike Andreâ\x80\ \x99s insurance company, Congress has not changed its position. There are others\ \ who continue to struggle, something Pamela Anderson believes can be fixed. â\x80\ \x9CThere are not too many cures for viruses like this,â\x80? she said. â\x80\x9C\ I think itâ\x80\x99s the beginning of a lot of great things.â\x80?" - text: The lenient sentence shows no "clear and convincing evidence of bias," a judicial panel said. Judge Aaron Persky Cleared Of Misconduct In Stanford Sex Assault Case The tragedy may be linked to drought in the area followed by recent heavy rains. Woman Killed When Giant Tree Topples On California Wedding Party Vincent Viola is a West Point graduate and U.S. Army veteran. Trump Picks Trading Firm Founder Vincent Viola For Army Secretary Despite their votes, Trump will be the biggest popular vote loser in raw numbers ever to reach the White House. Electoral College Makes It Official For Donald Trump, Despite Attempts By 'Faithless Electors' - text: "Ludhiana: A local court on Tuesday sentenced four persons to imprisonment\ \ for life in a murder case. The court of additional sessions judge Monika Goyal\ \ also imposed a fine of Rs 1.02 lakh on the convicts. On June 9, 2013, Samrala\ \ police had registered a kidnapping case against accused Parminder Singh, Inderjit\ \ Singh, and Kirpal Singh, of Mohanpur and Harjinder Singh of Ghulal village.\ \ Police later added sections on murder, theft and causing disappearance of evidence\ \ to the case. As per prosecution, on June 9, 2013, Bal Krishan, who runs a paint\ \ shop in Phagwara, in a statement, said that his sister Krishna Kumari, who got\ \ married to Nand Kumar of Samrala around 38 years ago, had a son, Rajnish Kumar,\ \ who is residing in England with his family. After his brother-in-lawâ\x80\x99\ s death, Krishan stayed in touch with his sister through telephone. One day, his\ \ nephew called him and told him that his mother was not picking the telephone\ \ and to inquire into the matter. After this, the complainant called his sister\ \ but her phone was switched off. Therefore, he went to her house in Samrala and\ \ found the doors open and household articles scattered. On inquiring from her\ \ neighbours, he came to know that she, along with her car, had been missing since\ \ June 7. He was certain that she had been kidnapped. During the course of investigation,\ \ on June 10, 2013, Accused Harjinderâ\x80\x99s acquaintance Prem Singhâ\x80\x99\ s statement was recorded. He alleged that the accused went to him on June 9, 2013\ \ and made extra judicial confession that they had murdered Krishna Kumari and\ \ thrown her body and Mahindra Verito Car in Bahilolpur canal. On the basis of\ \ his statement, all the accused were apprehended and articles and gold ornaments\ \ belonging to the deceased were seized from their possession. The deceasedâ\x80\ \x99s body was recovered from the canal and its postmortem was done. Police later\ \ presented a chargesheet against the accused in the court.During trial, the accused\ \ pleaded false implication. tnn" inference: true model-index: - name: SetFit with BAAI/bge-small-en-v1.5 results: - task: type: text-classification name: Text Classification dataset: name: Unknown type: unknown split: test metrics: - type: accuracy value: 0.9769230769230769 name: Accuracy --- # SetFit with BAAI/bge-small-en-v1.5 This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5) as the Sentence Transformer embedding model. A [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance is used for classification. The model has been trained using an efficient few-shot learning technique that involves: 1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning. 2. Training a classification head with features from the fine-tuned Sentence Transformer. ## Model Details ### Model Description - **Model Type:** SetFit - **Sentence Transformer body:** [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5) - **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance - **Maximum Sequence Length:** 512 tokens - **Number of Classes:** 26 classes ### Model Sources - **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit) - **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055) - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit) ### Model Labels | Label | Examples | |:------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | music and audio | | | shopping | | | food and drinks | | | news and politics | | | arts and culture | | | travel | | | business and finance | | | real estate | | | academic interests | | | style and fashion | | | pets | | | sports | | | books and literature | | | health | | | family and relationships | | | television | | | hobbies and interests | | | pharmaceuticals, conditions, and symptoms | | | personal finance | | | video gaming | | | technology and computing | | | movies | | | home and garden | | | healthy living | | | careers | | | automotives | | ## Evaluation ### Metrics | Label | Accuracy | |:--------|:---------| | **all** | 0.9769 | ## Uses ### Direct Use for Inference First install the SetFit library: ```bash pip install setfit ``` Then you can load this model and run inference. ```python from setfit import SetFitModel # Download from the 🤗 Hub model = SetFitModel.from_pretrained("biggy-smiley/setfit-bge-small-fibe-v3") # Run inference preds = model("The lenient sentence shows no \"clear and convincing evidence of bias,\" a judicial panel said. Judge Aaron Persky Cleared Of Misconduct In Stanford Sex Assault Case The tragedy may be linked to drought in the area followed by recent heavy rains. Woman Killed When Giant Tree Topples On California Wedding Party Vincent Viola is a West Point graduate and U.S. Army veteran. Trump Picks Trading Firm Founder Vincent Viola For Army Secretary Despite their votes, Trump will be the biggest popular vote loser in raw numbers ever to reach the White House. Electoral College Makes It Official For Donald Trump, Despite Attempts By 'Faithless Electors'") ``` ## Training Details ### Training Set Metrics | Training set | Min | Median | Max | |:-------------|:----|:---------|:----| | Word count | 100 | 312.8923 | 500 | | Label | Training Sample Count | |:------------------------------------------|:----------------------| | academic interests | 5 | | arts and culture | 5 | | automotives | 5 | | books and literature | 5 | | business and finance | 5 | | careers | 5 | | family and relationships | 5 | | food and drinks | 5 | | health | 5 | | healthy living | 5 | | hobbies and interests | 5 | | home and garden | 5 | | movies | 5 | | music and audio | 5 | | news and politics | 5 | | personal finance | 5 | | pets | 5 | | pharmaceuticals, conditions, and symptoms | 5 | | real estate | 5 | | shopping | 5 | | sports | 5 | | style and fashion | 5 | | technology and computing | 5 | | television | 5 | | travel | 5 | | video gaming | 5 | ### Training Hyperparameters - batch_size: (16, 16) - num_epochs: (1, 1) - max_steps: -1 - sampling_strategy: oversampling - body_learning_rate: (2e-05, 1e-05) - head_learning_rate: 0.01 - loss: CosineSimilarityLoss - distance_metric: cosine_distance - margin: 0.25 - end_to_end: False - use_amp: False - warmup_proportion: 0.1 - l2_weight: 0.01 - seed: 42 - eval_max_steps: -1 - load_best_model_at_end: False ### Training Results | Epoch | Step | Training Loss | Validation Loss | |:------:|:----:|:-------------:|:---------------:| | 0.0020 | 1 | 0.2184 | - | | 0.0984 | 50 | 0.1206 | - | | 0.1969 | 100 | 0.0487 | - | | 0.2953 | 150 | 0.0206 | - | | 0.3937 | 200 | 0.0188 | - | | 0.4921 | 250 | 0.0158 | - | | 0.5906 | 300 | 0.011 | - | | 0.6890 | 350 | 0.0115 | - | | 0.7874 | 400 | 0.0095 | - | | 0.8858 | 450 | 0.011 | - | | 0.9843 | 500 | 0.0115 | - | | 0.0020 | 1 | 0.0036 | - | ### Framework Versions - Python: 3.10.14 - SetFit: 1.1.0 - Sentence Transformers: 3.1.1 - Transformers: 4.44.2 - PyTorch: 2.4.0 - Datasets: 3.0.0 - Tokenizers: 0.19.1 ## Citation ### BibTeX ```bibtex @article{https://doi.org/10.48550/arxiv.2209.11055, doi = {10.48550/ARXIV.2209.11055}, url = {https://arxiv.org/abs/2209.11055}, author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren}, keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences}, title = {Efficient Few-Shot Learning Without Prompts}, publisher = {arXiv}, year = {2022}, copyright = {Creative Commons Attribution 4.0 International} } ```