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: jinaai/jina-embeddings-v2-base-en
model-index:
- name: SetFit with jinaai/jina-embeddings-v2-base-en
results:
- task:
type: text-classification
name: Text Classification
dataset:
name: Unknown
type: unknown
split: test
metrics:
- type: accuracy
value: 0.6666666666666666
name: Accuracy
SetFit with jinaai/jina-embeddings-v2-base-en
This is a SetFit model that can be used for Text Classification. This SetFit model uses jinaai/jina-embeddings-v2-base-en 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: jinaai/jina-embeddings-v2-base-en
- Classification head: a LogisticRegression instance
- Maximum Sequence Length: 8192 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.6667 |
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: (32, 32)
- 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.0017 | 1 | 0.311 | - |
0.0833 | 50 | 0.1338 | - |
0.1667 | 100 | 0.0054 | - |
0.25 | 150 | 0.0017 | - |
0.3333 | 200 | 0.0065 | - |
0.4167 | 250 | 0.0003 | - |
0.5 | 300 | 0.0003 | - |
0.5833 | 350 | 0.0005 | - |
0.6667 | 400 | 0.0004 | - |
0.75 | 450 | 0.0002 | - |
0.8333 | 500 | 0.0002 | - |
0.9167 | 550 | 0.0002 | - |
1.0 | 600 | 0.0002 | - |
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}
}