metadata
library_name: setfit
tags:
- setfit
- sentence-transformers
- text-classification
- generated_from_setfit_trainer
metrics:
- accuracy
widget:
- text: >-
considering the use of so-called “fractional citations” in which one
divides the number of citations associated with a given paper by the
number of authors on that paper [33–38];
- text: >-
Indeed, this is only one of a number of such practical inconsistencies
inherent in the traditional h-index; other similar inconsistencies are
discussed in Refs. [3, 4].
- text: >-
One of the referees recommends mentioning Quesada (2008) as another
characterization of the Hirsch index relying as well on monotonicity.
- text: >-
considering the use of so-called “fractional citations” in which one
divides the number of citations associated with a given paper by the
number of authors on that paper [33–38];
- text: >-
increasing the weighting of very highly-cited papers, either through the
introduction of intrinsic weighting factors or the development of entirely
new indices which mix the h-index with other more traditional indices
(such as total citation count) [3, 4, 7, 8, 26–32];
pipeline_tag: text-classification
inference: true
base_model: sentence-transformers/paraphrase-multilingual-mpnet-base-v2
model-index:
- name: SetFit with sentence-transformers/paraphrase-multilingual-mpnet-base-v2
results:
- task:
type: text-classification
name: Text Classification
dataset:
name: Unknown
type: unknown
split: test
metrics:
- type: accuracy
value: 0.6111111111111112
name: Accuracy
SetFit with sentence-transformers/paraphrase-multilingual-mpnet-base-v2
This is a SetFit model that can be used for Text Classification. This SetFit model uses sentence-transformers/paraphrase-multilingual-mpnet-base-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:
- Fine-tuning a Sentence Transformer with contrastive learning.
- Training a classification head with features from the fine-tuned Sentence Transformer.
Model Details
Model Description
- Model Type: SetFit
- Sentence Transformer body: sentence-transformers/paraphrase-multilingual-mpnet-base-v2
- Classification head: a LogisticRegression instance
- Maximum Sequence Length: 128 tokens
- Number of Classes: 9 classes
Model Sources
- Repository: SetFit on GitHub
- Paper: Efficient Few-Shot Learning Without Prompts
- Blogpost: SetFit: Efficient Few-Shot Learning Without Prompts
Model Labels
Label | Examples |
---|---|
ccro:BasedOn |
|
ccro:Basedon |
|
ccro:Compare |
|
ccro:Contrast |
|
ccro:Criticize |
|
ccro:Discuss |
|
ccro:Extend |
|
ccro:Incorporate |
|
ccro:Negate |
|
Evaluation
Metrics
Label | Accuracy |
---|---|
all | 0.6111 |
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/CCRO2")
# Run inference
preds = model("One of the referees recommends mentioning Quesada (2008) as another characterization of the Hirsch index relying as well on monotonicity.")
Training Details
Training Set Metrics
Training set | Min | Median | Max |
---|---|---|---|
Word count | 6 | 25.7812 | 53 |
Label | Training Sample Count |
---|---|
ccro:BasedOn | 1 |
ccro:Basedon | 11 |
ccro:Compare | 21 |
ccro:Contrast | 3 |
ccro:Criticize | 4 |
ccro:Discuss | 37 |
ccro:Extend | 1 |
ccro:Incorporate | 14 |
ccro:Negate | 4 |
Training Hyperparameters
- batch_size: (60, 60)
- num_epochs: (1, 1)
- max_steps: -1
- sampling_strategy: oversampling
- num_iterations: 100
- 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.0042 | 1 | 0.2507 | - |
0.2083 | 50 | 0.0639 | - |
0.4167 | 100 | 0.0017 | - |
0.625 | 150 | 0.0016 | - |
0.8333 | 200 | 0.0059 | - |
0.0031 | 1 | 0.0051 | - |
0.1562 | 50 | 0.0005 | - |
0.3125 | 100 | 0.001 | - |
0.4688 | 150 | 0.0001 | - |
0.625 | 200 | 0.0 | - |
0.7812 | 250 | 0.0 | - |
0.9375 | 300 | 0.0001 | - |
Framework Versions
- Python: 3.10.12
- SetFit: 1.0.3
- 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}
}