dim1_setfit_model / README.md
Zlovoblachko's picture
Push model using huggingface_hub.
f318b1f verified
metadata
tags:
  - setfit
  - sentence-transformers
  - text-classification
  - generated_from_setfit_trainer
widget:
  - text: >-
      Thesis: In my opinion, watching sports on TV is a good opportunity to get
      relax. There are many reasons why some people like to watch sport games on
      TV. Last argument: None Target sentence: Where is the truth?
  - text: >-
      Thesis: As for me, I suppose that watching sports via TV won't help you
      become a professional at sport. Moreover, sport events are not very
      interesting to be seen through television channels. Last argument:
      Besides, it's much more attractive to visit the play in the real life than
      to watch it at home for many reasons. Target sentence: If you watch the
      sport programme, you can see only those things that the operator wants to
      record.
  - text: >-
      Thesis: Today there are people who belived that watching any sport is a
      useless time spent. I complitely disagree with this opinion. Last
      argument: Watching any sort games or individual competition is wonderfull
      way to spend your free time, by this hobby you can have a lot of profits.
      Target sentence: Watching any sort games or individual competition is
      wonderfull way to spend your free time, by this hobby you can have a lot
      of profits.
  - text: >-
      Thesis: As for me, I suppose that watching sports via TV won't help you
      become a professional at sport. Moreover, sport events are not very
      interesting to be seen through television channels. Last argument:
      Besides, it's much more attractive to visit the play in the real life than
      to watch it at home for many reasons. Target sentence: Besides, it's much
      more attractive to visit the play in the real life than to watch it at
      home for many reasons.
  - text: >-
      Thesis: Some people consider that it is a waste of time, bit I desagree
      with this statment and try to refute it. Last argument: If looks on this
      statement otherwise, it is importnat to say that watching sport events is
      a usual hobby such as cooking, reading books and others. Target sentence:
      People who work in public catering like cooking and it is their hobby
      maybe.
metrics:
  - accuracy
pipeline_tag: text-classification
library_name: setfit
inference: true
datasets:
  - Zlovoblachko/DeepSeek_dim1
base_model: BAAI/bge-small-en-v1.5
model-index:
  - name: SetFit with BAAI/bge-small-en-v1.5
    results:
      - task:
          type: text-classification
          name: Text Classification
        dataset:
          name: Zlovoblachko/DeepSeek_dim1
          type: Zlovoblachko/DeepSeek_dim1
          split: test
        metrics:
          - type: accuracy
            value: 0.8740740740740741
            name: Accuracy

SetFit with BAAI/bge-small-en-v1.5

This is a SetFit model trained on the Zlovoblachko/DeepSeek_dim1 dataset that can be used for Text Classification. This SetFit model uses BAAI/bge-small-en-v1.5 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
L
  • 'Thesis: in my opinion it is uself and fun to do pysical exercise and my activity every day. I disagre wits his opinion because these people do not understand that sport should keep fit and mind. Last argument: Secondly the sport is very fun. Target sentence: However some people prefer to watch sports show on tv.'
  • 'Thesis: I personally disadree with this opinion because there are many reasons why watching sports can be useful for people. Last argument: However, I can understend people who agree with first point of view. Target sentence: On the other hand, sometimes it is very difficult to control the time which they lose for that.'
  • "Thesis: None Last argument: People opposing this position may say that sport is not an intellectual activity, so it is not worth spending time at all. Target sentence: They think that watching sport is not developing people's mind, so it has no sense to watch such things."
H
  • 'Thesis: I think, that watching sports really gives a lot of fun. Last argument: The second point is that sports fans are fond of their teams ond sports favoritres. Target sentence: Sports stimulates them to travel (like UFC or Olympic games), to collect merch, to have new datings.'
  • 'Thesis: So, can watching sport be called a waste of time. To my mind, observing a sports game is a fascinating pastime. However, in my opinion they are mistaken. Last argument: Even some hidden talents can be discovered. Target sentence: Although, it is obvious that we should not spend much time in front of the TV, some people believe that watching sports can make a person obese.'
  • 'Thesis: Some people think that spending free time watching sport on TV is just killing precious time. However, my personal opinion is that this activity is useful. Last argument: Also, it can be a good practice if you play some sport Target sentence: because while watching game you can learn some tricks of this game and then apply them in life.'

Evaluation

Metrics

Label Accuracy
all 0.8741

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("Zlovoblachko/dim1_setfit_model")
# Run inference
preds = model("Thesis: In my opinion, watching sports on TV is a good opportunity to get relax. There are many reasons why some people like to watch sport games on TV. Last argument: None Target sentence: Where is the truth?")

Training Details

Training Set Metrics

Training set Min Median Max
Word count 13 62.7806 140
Label Training Sample Count
L 540
H 540

Training Hyperparameters

  • batch_size: (16, 16)
  • num_epochs: (1, 1)
  • max_steps: -1
  • sampling_strategy: oversampling
  • 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
  • l2_weight: 0.01
  • seed: 42
  • eval_max_steps: -1
  • load_best_model_at_end: False

Training Results

Epoch Step Training Loss Validation Loss
0.0000 1 0.2674 -
0.0014 50 0.3254 -
0.0027 100 0.3135 0.3191
0.0041 150 0.2963 -
0.0055 200 0.2799 0.2615
0.0068 250 0.2521 -
0.0082 300 0.2554 0.2495
0.0096 350 0.2518 -
0.0110 400 0.2484 0.2488
0.0123 450 0.2498 -
0.0137 500 0.2456 0.2465
0.0151 550 0.2449 -
0.0164 600 0.2433 0.2435
0.0178 650 0.2416 -
0.0192 700 0.2424 0.2410
0.0205 750 0.2381 -
0.0219 800 0.2302 0.2300
0.0233 850 0.227 -
0.0246 900 0.2222 0.2428
0.0260 950 0.2129 -
0.0274 1000 0.2138 0.2144
0.0288 1050 0.2026 -
0.0301 1100 0.1888 0.2009
0.0315 1150 0.1735 -
0.0329 1200 0.1658 0.2017
0.0342 1250 0.1646 -
0.0356 1300 0.1442 0.1889
0.0370 1350 0.1428 -
0.0383 1400 0.1169 0.1804
0.0397 1450 0.1237 -
0.0411 1500 0.0989 0.1838
0.0424 1550 0.106 -
0.0438 1600 0.102 0.1703
0.0452 1650 0.0823 -
0.0466 1700 0.0822 0.1786
0.0479 1750 0.081 -
0.0493 1800 0.0674 0.1685
0.0507 1850 0.0593 -
0.0520 1900 0.0659 0.1732
0.0534 1950 0.0546 -
0.0548 2000 0.0508 0.1889
0.0561 2050 0.0447 -
0.0575 2100 0.0462 0.1637
0.0589 2150 0.0348 -
0.0602 2200 0.0256 0.2151
0.0616 2250 0.0273 -
0.0630 2300 0.0183 0.2285
0.0644 2350 0.0194 -
0.0657 2400 0.0245 0.2068

Framework Versions

  • Python: 3.11.13
  • SetFit: 1.1.3
  • Sentence Transformers: 4.1.0
  • Transformers: 4.54.0
  • PyTorch: 2.6.0+cu124
  • Datasets: 4.0.0
  • Tokenizers: 0.21.2

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}
}