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.9433

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/Jina_Sci2")
# Run inference
preds = model("For this purpose, it was first necessary to discover the interdependencies of the data attributes.")

Training Details

Training Set Metrics

Training set Min Median Max
Word count 5 26.2526 128
Label Training Sample Count
1 300
2 300
3 300
4 300
5 300
6 300
7 300
8 300
9 300

Training Hyperparameters

  • batch_size: (75, 75)
  • num_epochs: (1, 1)
  • max_steps: -1
  • sampling_strategy: oversampling
  • num_iterations: 10
  • 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.0014 1 0.4034 -
0.0694 50 0.2314 -
0.1389 100 0.1816 -
0.2083 150 0.1708 -
0.2778 200 0.1079 -
0.3472 250 0.1407 -
0.4167 300 0.0788 -
0.4861 350 0.0565 -
0.5556 400 0.0651 -
0.625 450 0.0402 -
0.6944 500 0.0468 -
0.7639 550 0.055 -
0.8333 600 0.0473 -
0.9028 650 0.0605 -
0.9722 700 0.03 -

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
23
Safetensors
Model size
22.7M params
Tensor type
F32
·
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Model tree for Corran/Jina_Sci2

Finetuned
(178)
this model

Evaluation results