--- library_name: setfit tags: - setfit - sentence-transformers - text-classification - generated_from_setfit_trainer metrics: - accuracy widget: - text: Further research is needed to develop more effective methods for the detection and inhibition of ESBLs in clinical settings. - text: Although the phosphomolybdenum method presents high accuracy and precision for vitamin E quantitation, its applicability to other antioxidants may require further investigation. - text: The persistent inflammation observed in Interleukin-10-deficient mice provides insight into the role of this cytokine in maintaining intestinal homeostasis and highlights the potential implications for human diseases, such as inflammatory bowel syndrome. - text: The proposed algorithms in this paper utilize Hamilton-Jacobi formulations to calculate the front propagation speed, which depends on the curvature of the front. - text: The IC50 values obtained from the semiautomated microdilution assay suggest that artesunate and dihydroartemisinin exhibit comparable antimalarial activity against the Plasmodium falciparum strains tested. pipeline_tag: text-classification inference: true base_model: kaisugi/scitoricsbert model-index: - name: SetFit with kaisugi/scitoricsbert results: - task: type: text-classification name: Text Classification dataset: name: Unknown type: unknown split: test metrics: - type: accuracy value: 0.8833333333333333 name: Accuracy --- # SetFit with kaisugi/scitoricsbert This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [kaisugi/scitoricsbert](https://huggingface.co/kaisugi/scitoricsbert) 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:** [kaisugi/scitoricsbert](https://huggingface.co/kaisugi/scitoricsbert) - **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:** 12 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 | |:----------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Aims | | | Background | | | Hypothesis | | | Implications | | | Importance | | | Limitations | | | Method | | | None | | | Purpose | | | Reccomendations | | | Result | | | Uncertainty | | ## Evaluation ### Metrics | Label | Accuracy | |:--------|:---------| | **all** | 0.8833 | ## 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("Corran/SciGenSetfit2") # Run inference preds = model("Further research is needed to develop more effective methods for the detection and inhibition of ESBLs in clinical settings.") ``` ## Training Details ### Training Set Metrics | Training set | Min | Median | Max | |:-------------|:----|:--------|:----| | Word count | 11 | 28.3767 | 60 | | Label | Training Sample Count | |:----------------|:----------------------| | Aims | 100 | | Background | 100 | | Hypothesis | 100 | | Implications | 100 | | Importance | 100 | | Limitations | 100 | | Method | 100 | | None | 100 | | Purpose | 100 | | Reccomendations | 100 | | Result | 100 | | Uncertainty | 100 | ### Training Hyperparameters - batch_size: (256, 256) - num_epochs: (1, 1) - max_steps: -1 - sampling_strategy: oversampling - num_iterations: 20 - 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 - seed: 42 - eval_max_steps: -1 - load_best_model_at_end: False ### Training Results | Epoch | Step | Training Loss | Validation Loss | |:------:|:----:|:-------------:|:---------------:| | 0.0053 | 1 | 0.2248 | - | | 0.2660 | 50 | 0.1239 | - | | 0.5319 | 100 | 0.1105 | - | | 0.7979 | 150 | 0.0665 | - | ### Framework Versions - Python: 3.10.12 - SetFit: 1.0.3 - Sentence Transformers: 2.2.2 - Transformers: 4.36.2 - PyTorch: 2.1.0+cu121 - Datasets: 2.16.1 - Tokenizers: 0.15.0 ## 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} } ```