Edit model card

SetFit with sentence-transformers/all-MiniLM-L6-v2

This is a SetFit model that can be used for Text Classification. This SetFit model uses sentence-transformers/all-MiniLM-L6-v2 as the Sentence Transformer embedding model. A LogisticRegression 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 with contrastive learning.
  2. Training a classification head with features from the fine-tuned Sentence Transformer.

Model Details

Model Description

Model Sources

Model Labels

Label Examples
1
  • 'As the results indicate, significant differences were found between the experimental group and the control group concerning the characteristics of the exploration process.'
  • 'No significant differences were found between fallers and non-fallers with respect to height, weight, or age.'
  • 'There was a significant difference between the 5% calcium hypochlorite group and the other groups (P<0.001).'
2
  • 'Our study was also limited by the lack of studies that reported age and gender-specific incidence for morbidity and mortality.'
  • 'And while quiet stance was examined here, it is important to emphasize that the use of perturbations have provided great insight into those at risk of falling, and future prospective trials which incorporate more sophisticated assessment of fall risk are certain to provide critical information on the reactive mechanics of stability and the effects of age-related degradation on individual balance strategies [25, 26] .Another limitation of this study is the dependence of self-reporting of falls, the key parameter used to stratify the elderly groups into those with recent fall history or those with a limited history of falls.'
  • "Because a patient's immigration status is not recorded concomitantly with hospital resource use in any hospital, state, or federal database, it is not currently possible to isolate charity care and bad debt expenditures on An additional complicating factor is the possibility that, as a result of PRWORA, hospitals may provide and bill for services as emergency services that previously were categorized as nonemergency services in order to secure Medicaid payment."
3
  • 'An 3-(4,5-dimethylthiazol-2yl)-2,5diphenyl tetrazolium bromide assay was used to evaluate the cytotoxicity of polyplexes at a series of N/P ratios in C6 and Hep G2 cells cultured in DMEM (with 10% fetal bovine serum) according to the methods described in our previous studies.'
  • 'A multivariate analysis using logistic regression was used to evaluate the independent role of each covariate in hospital mortality.'
  • 'Different methods have been used in the literature for implementing and updating the routing tables using the ant approach such as AntNet [1] .'
4
  • 'The results of this study indicate that only the right GVS interfered with mental transformation.'
  • 'The goal of this work is to explore the effects of general relativity on TDEs occurring in eccentric nuclear disks, and to quantify the distribution of orbital elements of TDEs that originate in eccentric nuclear disks.'
  • 'Our results may have a number of important implications to the astrophysics of relativistic plasma in general and that of PWN in particular.'
5
  • 'The gel retardation results of polymer/pDNA complexes with increasing N/P ratios are shown in Figure 1 .'
  • 'In line with this, it has been suggested that the drift occurs only when the observed rubber hand is congruent in terms of posture and identity with the participants unseen hand (Tsakiris and Haggard, 2005) .'
  • 'Mortality rates have been found to be high.'
6
  • 'In order to use the information on prior falls in the prediction algorithm, elderly subjects were divided into two groups; those with a record of self-reported recent falls (n = 24; 14.9% of total elderly group) and those who had reported no falls in the prior sixmonth period (n = 137; 85.1% of total elderly group).'
  • "Semi-structured interviews were conducted with four 'custodians' (people working in locations where devices were deployed)."
  • 'Patients who had previously undergone spinal surgery were excluded from the study.'
7
  • 'Then, the cells were incubated for 4 h, and fresh media were added to the culture for another 20 h. Then, 10 μl of sterile, filtered 3-(4,5-dimethylthiazol-2yl)-2,5diphenyl tetrazolium bromide solution in phosphate-buffered saline (PBS) (5 mg ml −1 ) was added to each well.'
  • 'One of the key problems in this area is the identification of influential users, by targeting whom certain desirable outcomes can be achieved.'
  • 'The paper proceeds as follows.'
8
  • 'The main aim of this paper is to present astrophysical parameters such as reddening, distance and age of Be 8 from four colour indices, (B − V ) , (V − I) , (R − I) and (G BP -G RP ) obtained from deep CCD U BV RI and Gaia photometries.'
  • 'A key finding of the present study was that the rapid increase in GATA4 binding activity in cardiac nuclear extracts in response to pressure overload is mediated by ET-1 but not Ang II.'
  • 'Section II of this paper provides an overview of the Bosch DCMG system and its components.'
9
  • 'These results provide additional support for an activating role for H3K4me3 and a silencing role for H3K27me3 as leaves age.'
  • 'Based on this result, it may be the case that the rate of apoptosis increases after day 5. in a previous study, mirnas were found to regulate cell proliferation, cell cycle progression and migration by altering the expressions of various factors, such as MalaT1 (48) .'
  • 'It is therefore likely that the efforts put in by many groups to unravel the spatial regulation of the bAR system will be relevant for the understanding of human disease.'

Evaluation

Metrics

Label Accuracy
all 0.9756

Uses

Direct Use for Inference

First install the SetFit library:

pip install setfit

Then you can load this model and run inference.

from setfit import SetFitModel

# Download from the 🤗 Hub
model = SetFitModel.from_pretrained("Corran/SciFunctions")
# Run inference
preds = model("These subjects were excluded from the study.")

Training Details

Training Set Metrics

Training set Min Median Max
Word count 5 26.0891 245
Label Training Sample Count
1 450
2 450
3 450
4 450
5 450
6 450
7 450
8 450
9 450

Training Hyperparameters

  • batch_size: (75, 75)
  • num_epochs: (1, 1)
  • max_steps: -1
  • sampling_strategy: oversampling
  • num_iterations: 20
  • body_learning_rate: (2e-05, 2e-05)
  • head_learning_rate: 2e-05
  • 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.0005 1 0.3763 -
0.0231 50 0.317 -
0.0463 100 0.2252 -
0.0694 150 0.189 -
0.0926 200 0.1505 -
0.1157 250 0.105 -
0.1389 300 0.1024 -
0.1620 350 0.0867 -
0.1852 400 0.0659 -
0.2083 450 0.0532 -
0.2315 500 0.0366 -
0.2546 550 0.0622 -
0.2778 600 0.0241 -
0.3009 650 0.0315 -
0.3241 700 0.025 -
0.3472 750 0.0412 -
0.3704 800 0.0274 -
0.3935 850 0.0203 -
0.4167 900 0.0302 -
0.4398 950 0.0152 -
0.4630 1000 0.0103 -
0.4861 1050 0.0102 -
0.5093 1100 0.0208 -
0.5324 1150 0.0168 -
0.5556 1200 0.0158 -
0.5787 1250 0.0045 -
0.6019 1300 0.014 -
0.625 1350 0.0061 -
0.6481 1400 0.0125 -
0.6713 1450 0.0048 -
0.6944 1500 0.0042 -
0.7176 1550 0.0055 -
0.7407 1600 0.0058 -
0.7639 1650 0.0032 -
0.7870 1700 0.0041 -
0.8102 1750 0.0042 -
0.8333 1800 0.0018 -
0.8565 1850 0.0094 -
0.8796 1900 0.0096 -
0.9028 1950 0.0043 -
0.9259 2000 0.003 -
0.9491 2050 0.0029 -
0.9722 2100 0.0016 -
0.9954 2150 0.0084 -

Framework Versions

  • Python: 3.10.12
  • SetFit: 1.0.1
  • Sentence Transformers: 2.2.2
  • Transformers: 4.35.2
  • PyTorch: 2.1.0+cu121
  • Datasets: 2.16.1
  • Tokenizers: 0.15.0

Citation

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}
}
Downloads last month
0
Safetensors
Model size
22.7M params
Tensor type
F32
·

Finetuned from

Evaluation results