CoolFace
Modelpublic

research-dump/bge-base-en-v1.5_wikidata_ent_masked_wikidata_ent_masked

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes3downloads
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. 1.Fine-tuning a Sentence Transformer with contrastive learning.
  2. 2.Training a classification head with features from the fine-tuned Sentence Transformer.

Model Details

Model Description

  • —Model Type: SetFit
  • —Sentence Transformer body: BAAI/bge-base-en-v1.5
  • —Classification head: a LogisticRegression instance
  • —Maximum Sequence Length: 512 tokens
  • —Number of Classes: 5 classes <!-- - Training Dataset: Unknown --> <!-- - Language: Unknown --> <!-- - License: Unknown -->

Model Sources

Model Labels

LabelExamples
1<ul><li>'###Instruction: Multi-class classification, answer with one of the labels: [delete, keep, speedy delete, comment] : ###Input: Q16350309: Adrianu (Q16350309) : Wikimedia disambiguation page : ( [MASK]historylinksentity usagelogs ) Merged with Q13195357 . Holger1959 ( talk ) 04:18, 11 August 2014 (UTC)'</li><li>"###Instruction: Multi-class classification, answer with one of the labels: [delete, keep, speedy delete, comment] : ###Input: Q3934746: Richard A. Colla (Q3934746) : American actor and film director : ( [MASK]historylinksentity usagelogs ) Merged in Q3430649 . BohemianRhapsody ( talk ) 21:46, 26 September 2013 (UTC) Isn't this item still in use? -- BeneBot* ( talk ) 21:55, 26 September 2013 (UTC)"</li><li>'###Instruction: Multi-class classification, answer with one of the labels: [delete, keep, speedy delete, comment] : ###Input: Q11060907: Cymo deplanatus (Q11060907) : species of crustacean : ( [MASK]historylinksentity usagelogs ) Merged into Q13508703 .\n-- Liangent ( talk ) 03:09, 27 November 2013 (UTC)'</li></ul>
4<ul><li>'###Instruction: Multi-class classification, answer with one of the labels: [delete, keep, speedy delete, comment] : ###Input: Q10135731: Template:Rfd links Merged with Q7150841 . Kittenono ( talk ) 16:36, 8 August 2013 (UTC)'</li><li>'###Instruction: Multi-class classification, answer with one of the labels: [delete, keep, speedy delete, comment] : ###Input: Q13164625: Guodian Chu Slips (Q13164625) : archaeological discovery in 1993 in Hubei, China : ( [MASK]historylinksentity usagelogs ) Merged into Q1151566 .\n-- 218.252.84.110 13:55, 30 May 2013 (UTC) '</li><li>'###Instruction: Multi-class classification, answer with one of the labels: [delete, keep, speedy delete, comment] : ###Input: Q16822576: Template:Rfd links Merged with Q16489568 . Pikolas ([[User talk:Pikolasint:Talkpagelinktext ]]) 14:27, 12 August 2014 (UTC)'</li></ul>
0<ul><li>'###Instruction: Multi-class classification, answer with one of the labels: [delete, keep, speedy delete, comment] : ###Input: Q60781646: Yellow Vests movement in France (Q60781646) : Spontaneous social movement in France : ( [MASK]historylinksentity usagelogs ) Already exists in more complete form at Q58805164 -- Fa suisse ( talk ) 01:40, 8 February 2019 (UTC) Not deleted — MisterSynergy ( talk ) 08:15, 9 February 2019 (UTC)'</li><li>'###Instruction: Multi-class classification, answer with one of the labels: [delete, keep, speedy delete, comment] : ###Input: Q61641722: Clementine Creevy (Q61641722) : American musician, singer and actress : ( [MASK]historylinksentity usagelogs ) Not notable Baby come ( talk ) 11:42, 7 February 2021 (UTC) Not deleted per above - meets notability -- DannyS712 ( talk ) 23:14, 7 February 2021 (UTC)'</li></ul>
3<ul><li>'###Instruction: Multi-class classification, answer with one of the labels: [delete, keep, speedy delete, comment] : ###Input: Q16017531: Template:Rfd links Merged into Q13135852 . -- DracoRoboter ([[User talk:DracoRoboterint:Talkpagelinktext ]]) 08:36, 21 May 2014 (UTC)'</li><li>'###Instruction: Multi-class classification, answer with one of the labels: [delete, keep, speedy delete, comment] : ###Input: Q12160071: Template:Rfd links Empty item. Aced ( talk ) 17:02, 30 June 2013 (UTC)'</li><li>'###Instruction: Multi-class classification, answer with one of the labels: [delete, keep, speedy delete, comment] : ###Input: Q5591236: Q5591236 : no description : ( [MASK]historylinksentity usagelogs ) Dup of Q809292 . -- John F. Lewis ( talk ) 23:11, 21 April 2013 (UTC)'</li></ul>
2<ul><li>'###Instruction: Multi-class classification, answer with one of the labels: [delete, keep, speedy delete, comment] : ###Input: Q118210393: Malgorzata (Q118210393) : female given name : ( [MASK]historylinksentity usagelogs ) Mistake Teukros ( talk ) 20:27, 7 May 2023 (UTC) On hold This item is linked from 1 other. -- DeltaBot ( talk ) 20:30, 7 May 2023 (UTC)'</li><li>'###Instruction: Multi-class classification, answer with one of the labels: [delete, keep, speedy delete, comment] : ###Input: Q83807364: SoundCloud account (Q83807364) : user account on SoundCloud : ( [MASK]historylinksentity usagelogs ) Not used Dartyytrad ( talk ) 21:18, 23 November 2021 (UTC) On hold This item is linked from 8 others. -- DeltaBot ( talk ) 21:20, 23 November 2021 (UTC) seems to be used? unsure if those uses are legit. BrokenSegue ( talk ) 04:06, 25 November 2021 (UTC) I listed one for deletion: Wikidata:Requestsfordeletions#Q83807994 . some should probably be changed to "soundcloud" + soundcloud id. --- Jura 11:45, 11 December 2021 (UTC) seems to be used? unsure if those uses are legit. BrokenSegue ( talk ) 04:06, 25 November 2021 (UTC) I listed one for deletion: Wikidata:Requestsfordeletions#Q83807994 . some should probably be changed to "soundcloud" + soundcloud id. --- Jura 11:45, 11 December 2021 (UTC) I listed one for deletion: Wikidata:Requestsfordeletions#Q83807994 . some should probably be changed to "soundcloud" + soundcloud id. --- Jura 11:45, 11 December 2021 (UTC) seems to be used? unsure if those uses are legit. BrokenSegue ( talk ) 04:06, 25 November 2021 (UTC) I listed one for deletion: Wikidata:Requestsfordeletions#Q83807994 . some should probably be changed to "soundcloud" + soundcloud id. --- Jura 11:45, 11 December 2021 (UTC) I listed one for deletion: Wikidata:Requestsfordeletions#Q83807994 . I listed one for deletion: Wikidata:Requestsfordeletions#Q83807994 . Not done due to uses. Thanks. Mike Peel ( talk ) 18:05, 27 February 2022 (UTC)'</li><li>'###Instruction: Multi-class classification, answer with one of the labels: [delete, keep, speedy delete, comment] : ###Input: Q23636702: Template:Rfd links empty item, no sitelinks, no statements, notability not clear Queryzo ([[User talk:Queryzoint:Talkpagelinktext ]]) 18:25, 19 May 2017 (UTC)'</li></ul>

Uses

Direct Use for Inference

First install the SetFit library:

bash
pip install setfit

Then you can load this model and run inference.

python
from setfit import SetFitModel

# Download from the 🤗 Hub
model = SetFitModel.from_pretrained("research-dump/bge-base-en-v1.5_wikidata_ent_masked_wikidata_ent_masked")
# Run inference
preds = model("###Instruction: Multi-class classification, answer with one of the labels: [delete, keep, speedy delete, comment] : ###Input:  Q11843502: Template:Rfd links Merged with Q4470435 . Succu ([[User talk:Succu| int:Talkpagelinktext ]]) 19:36, 12 February 2014 (UTC)")

<!--

Downstream Use

List how someone could finetune this model on their own dataset. -->

<!--

Out-of-Scope Use

List how the model may foreseeably be misused and address what users ought not to do with the model. -->

<!--

Bias, Risks and Limitations

What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model. -->

<!--

Recommendations

What are recommendations with respect to the foreseeable issues? For example, filtering explicit content. -->

Training Details

Training Set Metrics

Training setMinMedianMax
Word count2853.78382279
LabelTraining Sample Count
02
1733
218
356
4190

Training Hyperparameters

  • —batch_size: (8, 2)
  • —num_epochs: (5, 5)
  • —max_steps: -1
  • —sampling_strategy: oversampling
  • —num_iterations: 10
  • —bodylearningrate: (1e-05, 1e-05)
  • —headlearningrate: 5e-05
  • —loss: CosineSimilarityLoss
  • —distancemetric: cosinedistance
  • —margin: 0.25
  • —endtoend: True
  • —use_amp: True
  • —warmup_proportion: 0.1
  • —l2_weight: 0.01
  • —seed: 42
  • —evalmaxsteps: -1
  • —loadbestmodelatend: False

Training Results

EpochStepTraining LossValidation Loss
0.000410.041-
0.20025000.18610.1338
0.400310000.09270.1352
0.600515000.05390.1385
0.800620000.04140.1415
1.000825000.02840.1429
1.201030000.02180.1359
1.401135000.02040.1388
1.601340000.01840.1486
1.801445000.01570.1465
2.001650000.01160.1530
2.201855000.00880.1492
2.401960000.00780.1582
2.602165000.00810.1680
2.802270000.00620.1487
3.002475000.00530.1466
3.202680000.0040.1462
3.402785000.00390.1489
3.602990000.00250.1507
3.803095000.00140.1487
4.0032100000.00150.1471
4.2034105000.00170.1433
4.4035110000.0010.1434
4.6037115000.00130.1425
4.8038120000.00070.1436

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

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

<!--

Glossary

Clearly define terms in order to be accessible across audiences. -->

<!--

Model Card Authors

Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction. -->

<!--

Model Card Contact

Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors. -->