SetFit with sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2

This is a SetFit model that can be used for Text Classification. This SetFit model uses sentence-transformers/paraphrase-multilingual-MiniLM-L12-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
2
1
  • 'fails .... which guideline is most appropriate here? '
  • 'There is sufficient to support and simple , bit I totally agree with NOM, '
  • 'fails and , as no independent sources seem to exist about them'
0
  • "Having looked at the wikiproject Football's list of fully professional leagues I'am convinced also that Jogurneys claim that this article passes . Therefore I shall change my decsion to '''keep"
  • 'References on this article and on Comic Valkyrie indicate there is enough coverage of that magazine to make it
3
  • 'obviously if no content can be derived from reliable sources because nothing has happened yet. Merge to Sporting Clube de Portugal per . โ€“&nbsp'
  • 'to Vancouver School Board per precedent as stated at '
  • "rescuable'' content to police aircraft, the list of incidents involving paragliders where police attended is and probably unredeemable. Current article title not salvageable though"

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("research-dump/paraphrase-multilingual-MiniLM-L12-v2_wikipedia_stance_wikipedia_stance")
# Run inference
preds = model("Meets . &mdash")

Training Details

Training Set Metrics

Training set Min Median Max
Word count 2 35.91 244
Label Training Sample Count
0 7
1 64
2 25
3 4

Training Hyperparameters

  • batch_size: (8, 2)
  • num_epochs: (5, 5)
  • max_steps: -1
  • sampling_strategy: oversampling
  • num_iterations: 10
  • body_learning_rate: (1e-05, 1e-05)
  • head_learning_rate: 5e-05
  • loss: CosineSimilarityLoss
  • distance_metric: cosine_distance
  • margin: 0.25
  • end_to_end: True
  • use_amp: True
  • 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.004 1 0.4902 -
2.0 500 0.1123 0.2384
4.0 1000 0.0069 0.2568

Framework Versions

  • Python: 3.12.7
  • SetFit: 1.1.1
  • Sentence Transformers: 3.4.1
  • Transformers: 4.48.2
  • PyTorch: 2.6.0+cu124
  • Datasets: 3.2.0
  • Tokenizers: 0.21.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
0
Safetensors
Model size
118M params
Tensor type
F32
ยท
Inference Providers NEW
This model is not currently available via any of the supported third-party Inference Providers, and the model is not deployed on the HF Inference API.

Model tree for research-dump/paraphrase-multilingual-MiniLM-L12-v2_wikipedia_stance_wikipedia_stance