Edit model card

SetFit with sentence-transformers/all-MiniLM-L6-v2

This is a SetFit model that can be used for Text Classification. This SetFit model uses sentence-transformers/all-MiniLM-L6-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
1
  • 'HELP ME AND MY FAMILY PLEASE.\n\n\nDEAR FRIEND,\n\nTHROUGH THE COURTESY OF BUSINESS OPPORTUNITY, I TAKE LIBERTY ANCHORED ON A\nSTRONG DESIRE TO SOLICIT YOUR ASSISTANCE ON THIS MUTUALLY BENEFICIAL AND\nRISKFREE TRANSACTION WHICH I HOPE YOU WILL GIVE YOUR URGENT ATTENTION.\n\nI AM MR.SESAY MASSAQUOE I AM MOVED TO WRITE YOU THIS LETTER ,THIS WAS IN\nCONFIDENCE CONSIDERING OUR PRESENT CIRCUMSTANCE AND SITUATION.\n\nI ESCAPED WITH MY WIFE AND CHILDREN OUT OF SIERRA- LEONE TO\nGROU-JIRNSSUM,A VILLAGE IN THE NETHERLANDS THROUGH THE AID OF THE UNITED\nNATIONS EVACUATION TEAM WHERE WE ARE NOW PRESENTLY RESIDING ON TEMPORARY\nPOLITICAL ASYLUM.\n\nHOWEVER DUE TO THIS SITUATION I DECIDED TO CHANGE MOST OF MY BILLIONS OF\nDOLLARS DEPOSITED IN SWISS BANK AND OTHER COUNTRIES INTO OTHER FORMS OF\nMONEY CODED FOR SAFE PURPOSE BECAUSE THE NEW HEAD OF STATES AHMED TEJAN\nKABBA MADE ARRANGEMENTS WITH THE SWISS GOVERNMENT AND OTHER EUROPEAN\nCOUNTRIES TO FREEZE ALL MY TREASURES DEPOSITED IN SOME EUROPEAN\nCOUNTRIES,HENCE I AND MY WIFE ALONG WITH MY CHILDREN, DECIDED LAYING LOW\nIN THIS OUR TEMPOERY POLITICAL ASYLUM CAMP HERE IN GROU JIRNSSUM IN THE\nNETHERLANDS TO STUDY THE SITUATION TILL WHEN THINGS GETS BETTER,SINCE\nPRESIDENT TEJAN KABBA TAKING OVER GOVERNMENT AGAIN IN SIERRA-LEONE ONE OF\nMY CHATEAUX IN SOUTHERN FRANCE WAS CONFISCATED BY THE FRENCH\nGOVERNMENT,AND AS SUCH WE HAD TO CHANGE OUR IDENTITY SO THAT OUR\nINVESTMENT WILL NOT BE TRACED AND CONFISCATED.\n\nI HAVE DEPOSITED THE SUM OF THIRTY MILLION,FIVE HUNDRED THOUSAND UNITED\nSTATES DOLLARS(US$30,500,000)WITH A SECURITY COMPANY FOR SAFEKEEPING.\nTHE FUNDS ARE SECURITY CODED TO PREVENT THEM FROM KNOWING THE ACTUAL\nCONTENTS.\n\nWHAT I WANT YOU TO DO NOW IS TO INDICATE YOUR INTEREST THAT YOU WILL\nASSIST ME AND MY IMMEDIATE FAMILY BY RECEIVING THE MONEY ON OUR BEHALF.\nTHE ACCOUNT REQUIRED FOR THIS PROJECT CAN EITHER BE PERSONAL,COMPANY OR AN\nOFFSHORE ACCOUNT THAT YOU HAVE TOTAL CONTROL OVER,YOUR AREA OF\nSPECIALISATION WILL NOT BE A HINDERANCE TO THE SUCCESSFUL EXECUTION OF\nTHIS TRANSACTION.\n\nACKOWLEDGE THIS MESSAGE,SO THAT I CAN INTRODUCE YOU TO MY FAMILY AS OUR\nFOREIGN TRUSTED PARTNER WHO SHALL TAKE CHARGE OF OUR INVESTMENT ABROAD\nWHERE WE NOW PLAN TO SETTLE.\n\nI WANT YOU TO ASSIST US IN INVESTING THIS MONEY,BUT I WILL NOT WANT OUR\nIDENTITY REVEALED.I WILL ALSO WANT TO BUY PROPERTIES AND STOCKS IN\nMULTI-NATIONAL COMPANIES AND TO ENGAGE IN OTHER SAFE AND NON SPECULATIVE\nINVESTMENTS.\nWE HAVE BEEN THROUGH A LOT OF HEALTH AND SPIRITUAL TURMOIL,HENCE WILL NEED\nYOUR UNDERSTANDING AND ASSISTANCE.\n\nMAY I AT THIS POINT EMPHASIZE THE HIGH LEVEL OF CONFIDENTIALLITY WHICH\nTHIS BUSINESS DEMANDS AND HOPE YOU WILL NOT BETRAY THE TRUST AND\nCONFIDENCE WHICH WE REPOSE IN YOU.I SHALL PUT YOU IN THE PICTURE OF THIS\nBUSINESS,I.E TELL YOU WHERE THE FUNDS ARE CURRENTLY BEING MAINTAINED AND\nALSO DISCUSS OTHER MODALITIES INCLUDING REMUNERATION FOR YOUR SERVICES.\n\nI SHALL INFORM YOU WITH THE NEXT LINE OF ACTION AS SOON AS I RECEIVE YOUR\nPOSITIVE RESPONSE.\n\nIS THIS PROPOSITION ATTAINABLE?IF IT IS,PLEASE KINDLY FURNISH ME\nIMMEDIATELY BY E-MAIL WITH YOUR DIRECT TELEPHONE AND FAX NUMBERS TO\nENHANCE THE CONFIDENTIALLITY WHICH THIS BUSINESS DEMANDS.\n\nBEST REGARDS\nMR.SESAY MASSAQUOE.\nREPLY TO MY PRIVATE EMAIL ADDRESS...........>sesmassa@pro.hu\n\n\n__________________________________________________________ \n For special offers on latest publications on Malta or by Maltese authors go to http://shop.di-ve.com'
  • 'New USDT Wallet Address for Payment\n\n\nDear customer Batel11,We want to inform you of an important update regarding our payment methods. As part of our ongoing efforts to streamline our payment processes and enhance security, we have established a new USDT (Tron) wallet address for receiving payments.New USDT Wallet Address: TPNq8zpLivwQi9FyaWhuycghYgB2i9RV4pPlease make sure to double-check the new wallet address before making any payments to avoid any potential issues. If you have any questions or need assistance with this update, please do not hesitate to contact our customer support team.Warm regards,'
  • "URGENT\n\n\nAttn: The President, \n\nDear Sir, \n\nMy mail may come to you as a surprise, but sincerely this is a \nproposal for a business deal that will benefit both of us. I am \ncontacting you after a frantic search for a person who will be \ntrustworthy and capable of handling a business of this dimension. \n\nMy name is Mr. Jonathan Mokoena, the Under-Secretary in charge of \nIntergration at the Specialized Technical Committee of the African \nUnion (AU), formerly Organization of Afriacn Unity (OAU). You may be \naware of the transformation of the OAU to AU, and the mandate to \nbuild a new united Africa modelled on the pattern of European Union \n(EU). For this therefore, the various African leaders recently \ninaugurated the New Patnership for African Development (NEPAD). NEPAD \nis to streamline Africa towards achieving a common market, defence \nforce, currency, foreign policy, judiciary etc. For the above, the \nvarious African countries have made whosoever contributions in \nhundreds of million dollars. We have equally received grants/aids \nfrom the EU, USA and other international governments and agencies. \nThese moneies in all have ran into millions of dollars. \n\n\nAs the officer in charge of receiving and managing these funds and \nexecuting the projects for which they are ment for, I have received \nall the money expected. I have also prepared my account which I have \nsubmitted to the AU High Command, and it has been approved by the AU \nSecratary-General, Dr. Amara Essy. However, in some of the money \nreceived, some of the donor countries and international bodies \nremitted to us amounts in excess of what they pledged. The AU before \nnow, has written to all of them to acknowledge the receipt of the \nmonies from them. The money in excess and which I have kept out with \nonly me having knowledge of it, is in the tune of Thirty-Five Million United States Dollars (US$35,000,000.00). As it is now, this money belongs to me, as neither the AU nor any of the donor countries/international agencies has declared their money missing. \n\n\nI am therefore contacting you to assist me with the movement and \nsafe-keeping of this fund. As a public officer in my category, I \ncannot openly put this money into any bank here in Addis Ababa, \nEthiopia, the AU headquarters where I am now, or in any other part of \nAfrica, as an account holder. This will surely raise eyebrows and \nexpose me. I have therefore concealed this amount of US$35M in four \nmetal trunk boxes, and declared them as artefacts belonging to a \nforeigner. I deposited the boxes with a Security Company based in \nSpain which has an affliate offices in Ghana, Cot d'Ivoire and South Africa. These cities are safe havens for this kind of transaction. \n\nThis transaction will however be hitch-free. So, I would therefore \nwant you to be in Banjul, The Gambia for the clearing and claiming of \nthis fund. I will furnish you with information/documents on how \n\nyou will stand as the beneficiary of the boxes. I have decided to \ngive to you 40% of the total amount involved. \n\nPlease I will want you to contact me on this e-mail address or the \nalternative: (joe_mokoena@fastermail.com). \n\n\nAlso, you have to assure me of the secrecy and confidentiality in \nthis transaction. \n\nThanks in anticipation of your valued co-operation. \n\nMr. Jonathan Mokoena."
0
  • 'empty\n\n\nhello'
  • 'Re: Hello\n\n\nHmm On Mar 11 2024 08:31 PM TestUser21 wrote:It works!"

Evaluation

Metrics

Label Accuracy
all 0.9688

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("rendulic/setfit-ll-MiniLM-L6-v2-email-fraud-2024-05-18")
# Run inference
preds = model("How to resolve!


www.rewire.comInternational Financial Services - RewireInternational Financial Services - RewireGood Day YvonneOpen the attach file sent ,after the departmental payment receipt has be uploaded we also sent awareness letter note to Mr chalan which should be sent to your bank directly by chalan,Please ensure chalan uploads the departmental payment receipt receipt as soon as possible because the amount to your account is more than $100,000 when converted from pound sterling to USD,please write him (chalan)as soon as possible to settle thisKind RegardsReire Paying Deptwww.rewire.com")

Training Details

Training Set Metrics

Training set Min Median Max
Word count 1 260.5 816
Label Training Sample Count
0 18
1 14

Training Hyperparameters

  • batch_size: (32, 32)
  • num_epochs: (3, 3)
  • max_steps: -1
  • sampling_strategy: oversampling
  • num_iterations: 60
  • body_learning_rate: (0.0001, 0.0001)
  • head_learning_rate: 0.0001
  • 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.0083 1 0.2559 -
0.4167 50 0.0007 -
0.8333 100 0.0002 -
1.25 150 0.0002 -
1.6667 200 0.0001 -
2.0833 250 0.0001 -
2.5 300 0.0001 -
2.9167 350 0.0001 -

Framework Versions

  • Python: 3.10.12
  • SetFit: 1.0.3
  • Sentence Transformers: 2.7.0
  • Transformers: 4.40.2
  • PyTorch: 2.2.1+cu121
  • Datasets: 2.19.1
  • 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
23
Safetensors
Model size
22.7M params
Tensor type
F32
·

Finetuned from

Evaluation results