Edit model card

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

This is a SetFit model that can be used for Text Classification. This SetFit model uses BAAI/bge-base-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
0
  • "The answer is largely accurate and addresses the steps for petting a bearded dragon, such as using 1 or 2 fingers to stroke its head and picking it up if it's relaxed. However, it includes a section about using a specific perfume or scent to make the dragon comfortable, which is incorrect and can be overwhelming to the animal. The answer overall provides useful advice and follows guidelines from the document, but this misinformation about using scents is problematic.\n\nEvaluation:\nThe answer contains misinformation that isn't supported by the document and could be harmful.\nThe final evaluation:"
  • 'The answer is factually incorrect and lacks alignment with the provided document. The document explicitly details the following identifying characteristics of a funnel spider: dark brown or black body, a hard and shiny carapace, large downward-pointing fangs, visible spinnerets, and an average size between 1 to 5 cm. The document also mentions that these spiders are found only in Australia and prefer moist, cool, and sheltered areas. Furthermore, the document specifies the differences between male and female funnel spiders. \n\nHowever, the answer lists traits like a light brown or gray body and legs covered with a thick, bright layer of hair, which directly contradicts the descriptions given in the document. It also mentions a "soft, dull carapace" which is incorrect according to the provided information. Additionally, it introduces irrelevant and incorrect details like the "3 small, non-poisonous fangs" which are contrary to the document's information about the funnel spider's large, poisonous fangs.\n\nDue to these contradictions and inaccuracies, the answer is not grounded in the document.\n\nFinal evaluation:'
  • 'Evaluation:\nThe answer provided correctly addresses the question by confirming that Luis Figo left Barcelona to join Real Madrid, which is corroborated by the document.\n\nFinal Evaluation:'
1
  • 'The answer is well-grounded in the document and provides detailed, relevant information on how to hold a note while singing. It addresses several key points mentioned in the document, such as proper breathing techniques, posture, engaging specific muscles, and releasing air gradually. The information aligns with the steps and recommendations given in the document, ensuring that all major aspects are covered.\n\nFinal evaluation:'
  • 'The answer effectively addresses the question by providing advice on how to stop feeling empty and is correctly grounded in the document. The suggestions, such as journaling, trying new things, and making new friends, align with the recommendations within the document. Additionally, it elaborates on specific strategies, like altering routines and engaging in social activities, which are supported by the information in the document.\n\nFinal evaluation:'
  • 'The answer provided is grounded in the document and correctly explains the process of air-drying curly hair. It highlights important steps such as using hands to squeeze out excess water, applying leave-in conditioner, detangling with a wide-tooth comb, using styling products, and lifting the roots. The details match those provided in the document, making the answer consistent and accurate.\n\nFinal evaluation:'

Evaluation

Metrics

Label Accuracy
all 0.9054

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("Netta1994/setfit_baai_wikisum_gpt-4o_cot-few_shot_remove_final_evaluation_e1_1726757655.403782")
# Run inference
preds = model("The answer provides comprehensive information for identifying a funnel spider, including details about their physical characteristics such as body color, carapace, fangs, size, spinnerets, and distinctions between males and females. The document confirms all these points, making the answer well-grounded and accurate.

Final evaluation:")

Training Details

Training Set Metrics

Training set Min Median Max
Word count 25 91.5714 242
Label Training Sample Count
0 33
1 37

Training Hyperparameters

  • batch_size: (16, 16)
  • 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
  • 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.0057 1 0.2266 -
0.2857 50 0.2062 -
0.5714 100 0.0339 -
0.8571 150 0.0039 -

Framework Versions

  • Python: 3.10.14
  • SetFit: 1.1.0
  • Sentence Transformers: 3.1.0
  • Transformers: 4.44.0
  • PyTorch: 2.4.1+cu121
  • Datasets: 2.19.2
  • Tokenizers: 0.19.1

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
109M params
Tensor type
F32
·
Inference Examples
Inference API (serverless) is not available, repository is disabled.

Model tree for Netta1994/setfit_baai_wikisum_gpt-4o_cot-few_shot_remove_final_evaluation_e1_1726757655.403782

Finetuned
this model

Evaluation results