Edit model card

SetFit with sentence-transformers/paraphrase-mpnet-base-v2

This is a SetFit model that can be used for Text Classification. This SetFit model uses sentence-transformers/paraphrase-mpnet-base-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
Password reset emails
  • 'Dear [Recipient],\n\nAs part of our ongoing efforts to enhance security measures, we require you to reset your password for your account at [Your Company/Organization Name].\n\nTo initiate the password reset process, please follow the instructions below:\n\nVisit the password reset page by clicking on the link below:\n[Password Reset Link]\n\nEnter your username/email associated with your account.\n\nFollow the on-screen prompts to create a new password.\n\nPlease note that for security reasons, this link will expire within [X] hours. If you did not request this password reset or suspect any unauthorized activity on your account, please contact our support team immediately at [Support Contact Information].\n\nThank you for your cooperation in maintaining the security of your account.\n\nBest regards,\n\n[Your Name]\n[Your Position/Department (if applicable)]\n[Your Company Name]\n[Your Contact Information]\n\n\n\n\n\n'
  • 'Dear [Recipient],\n\nWe have received a request to reset the password for your account associated with [Your Company/Organization Name]. If you initiated this request, please follow the instructions below to reset your password:\n\nClick on the following link to reset your password: [Password Reset Link]\nFollow the on-screen prompts to create a new password.\nOnce completed, you can log in to your account using your new password.\nIf you did not request this password reset or believe this email was sent in error, please ignore this message. Your current password will remain unchanged.\n\nIf you have any questions or concerns, please contact our support team at [Support Contact Information].\n\nBest regards,\n[Your Name]\n[Your Position/Department (if applicable)]\n[Your Company Name]'
  • 'Dear [Recipient],\n\nYou have requested to reset the password for your account at [Your Company/Organization Name]. Follow the instructions below to reset your password:\n\nVisit the password reset page by clicking on the following link: [Password Reset Link]\nEnter your username/email associated with your account.\nFollow the on-screen instructions to create a new password.\nOnce completed, your password will be successfully reset.\nIf you did not initiate this password reset request, please disregard this email. Your account remains secure, and no changes have been made.\n\nIf you have any questions or need further assistance, please contact our support team at [Support Contact Information].\n\nBest regards,\n[Your Name]\n[Your Position/Department (if applicable)]\n[Your Company Name]'
System Alerts
  • 'Dear [Customer/User],\n\nWe hope this email finds you well. We wanted to inform you about an upcoming system maintenance activity scheduled for [Date/Time].\n\nDuring this maintenance window, there might be temporary disruptions to our services. We apologize for any inconvenience this may cause and assure you that our team will work diligently to minimize the impact and restore full functionality as quickly as possible.\n\nThank you for your understanding and cooperation.\n\nBest regards,\n[Your Company Name]'
  • 'Dear [Recipient],\n\nWe regret to inform you that our servers are currently experiencing downtime due to unexpected technical issues. Our technical team is actively working to resolve the issue and restore services as soon as possible.\n\nDuring this time, you may experience interruptions in accessing our systems and services. We apologize for any inconvenience this may cause and appreciate your patience and understanding.\n\nWe will provide regular updates on the situation as it progresses. If you have any urgent concerns or require immediate assistance, please contact our support team at [Support Contact Information].\n\nThank you for your cooperation.\n\nBest regards,\n[Your Name]\n[Your Position/Department]\n[Your Company Name]'
  • 'Dear [Recipient],\n\nWe regret to inform you that our security systems have detected unauthorized access to our network. As a precautionary measure, we have initiated a comprehensive investigation to determine the extent of the breach and mitigate any potential risks.\n\nDuring this time, we advise all users to exercise caution and remain vigilant for any suspicious activity. If you notice any unusual behavior or unauthorized access to your account, please report it immediately to our security team at [Security Contact Information].\n\nWe apologize for any inconvenience this may cause and assure you that we are taking all necessary steps to address the situation and safeguard our systems and data.\n\nThank you for your cooperation.\n\nBest regards,\n[Your Name]\n[Your Position/Department]\n[Your Company Name]'
Promotional emails
  • "Dear [Customer],\n\nWe are excited to announce a special promotion exclusively for our valued customers like you! For a limited time only, we are offering a [X]% discount on our latest range of products.\n\nWhether you're looking for [mention specific products/categories], now is the perfect opportunity to upgrade and enjoy incredible savings.\n\nHurry, this offer won't last long! Visit our website [insert website link] or visit our nearest store to explore our collection and take advantage of this fantastic deal.\n\nThank you for choosing [Your Company Name]. We appreciate your continued support.\n\nBest regards,\n[Your Company Name]\n\n\n\n\n"
  • "Dear [Recipient's Name],\n\nWe are excited to introduce our latest collection, featuring [highlighted product features]. From stylish apparel to must-have accessories, we have something for everyone.\n\nTake advantage of our special launch offer: [Promotional offer details]. Don't miss out - shop now and elevate your wardrobe!\n\nVisit our website [Link to Website] to explore the full collection.\n\nHappy shopping!\n\nBest regards,\n[Your Name]\n[Your Position/Department]\n[Your Contact Information]"
  • "Dear [Recipient's Name],\n\nSpring into savings with our exciting sale event! Enjoy [Discount percentage]% off sitewide on all your favorite products.\n\nFrom spring essentials to trend-setting fashion, we have everything you need to refresh your wardrobe this season.\n\nShop now and make the most of this limited-time offer!\n\nWarm regards,\n[Your Name]\n[Your Position/Department]\n[Your Contact Information]"
Automatic subscription confirmation emails
  • "Dear [Recipient],\n\nThank you for subscribing to [Product/Service Name]! We're thrilled to have you on board.\n\nTo complete the subscription process and start receiving updates, newsletters, and exclusive offers, please confirm your subscription by clicking on the link below:\n\n[Subscription Confirmation Link]\n\nBy confirming your subscription, you'll stay up-to-date with the latest news, product launches, and special promotions tailored just for you.\n\nIf you did not initiate this subscription or believe this email was sent in error, please disregard it.\n\nThank you for choosing [Your Company/Organization Name]. We look forward to serving you!\n\nBest regards,\n\n[Your Name]\n[Your Position/Department (if applicable)]\n[Your Company Name]\n[Your Contact Information]"
  • "Dear [Recipient's Name],\n\nThank you for subscribing to our newsletter. You're now part of our community! We're excited to share the latest updates, promotions, and exclusive offers with you.\n\nYou will start receiving our newsletter shortly. If you have any questions or feedback, feel free to reply to this email.\n\nBest regards,\n[Your Name]\n[Your Position/Department]\n[Your Contact Information]"
  • "Hello [Recipient's Name],\n\nCongratulations! Your account registration is complete. You are now a member of our platform.\n\nWith your account, you can access exclusive content, manage your preferences, and much more.\n\nIf you have any questions or need assistance, please don't hesitate to reach out.\n\nBest regards,\n[Your Name]\n[Your Position/Department]\n[Your Contact Information]"
Email Delivery failure notifications
  • 'Dear [Recipient],\n\nWe regret to inform you that your recent email delivery encountered an issue and was not successfully delivered to the intended recipient.\n\nThe email with the subject "[Subject of the Email]" sent on [Date/Time] was returned due to the following reason: [Brief description of the delivery failure reason, such as invalid recipient address, mailbox full, or network issues].\n\nTo ensure that your message reaches its destination, we recommend reviewing and correcting any errors in the recipient's email address or content of the email. Once done, you may resend the email.\n\nIf you believe this notification is received in error or require further assistance, please don't hesitate to contact our support team at [Support Contact Information].\n\nWe apologize for any inconvenience this may have caused and appreciate your understanding.\n\nBest regards,\n\n[Your Name]\n[Your Position/Department (if applicable)]\n[Your Company Name]\n[Your Contact Information]'
  • 'Dear [Recipient],\n\nWe regret to inform you that the email with the subject "[Subject]" sent on [Date/Time] was not successfully delivered due to an invalid recipient address.\n\nTo ensure successful delivery of future communications, please review and verify the recipient's email address for accuracy. Once corrected, you may resend the email.\n\nIf you require any assistance or have any questions, please don't hesitate to contact our support team at [Support Contact Information].\n\nThank you for your attention to this matter.\n\nBest regards,\n\n[Your Name]\n[Your Position/Department (if applicable)]\n[Your Company Name]\n[Your Contact Information]'
  • 'Dear [Recipient],\n\nWe regret to inform you that the email with the subject "[Subject]" sent on [Date/Time] was not successfully delivered due to your mailbox being full.\n\nTo ensure successful delivery of future emails, we recommend clearing out unnecessary emails or upgrading your mailbox storage capacity. Once completed, please let us know, and we will be happy to resend the email.\n\nIf you require any assistance or have any questions, please don't hesitate to contact our support team at [Support Contact Information].\n\nThank you for your attention to this matter.\n\nBest regards,\n\n[Your Name]\n[Your Position/Department (if applicable)]\n[Your Company Name]\n[Your Contact Information]'
Out-of- office replies
  • 'Dear [Recipient],\n\nThank you for your email. I am currently out of the office and will not be able to respond to emails until [Date of Return].\n\nDuring this time, I will have limited access to my email and may not be able to reply promptly. Rest assured, I will attend to your email as soon as possible upon my return.\n\nIf your matter is urgent and requires immediate assistance, please contact [Alternative Contact Person/Department] at [Alternative Contact Email/Phone Number].\n\nFor all other inquiries, I kindly ask for your patience and understanding. I will do my best to respond to your email as soon as I am back in the office.\n\nThank you for your understanding.'
  • 'Dear Sender,\n\nThank you for your email. I am currently out of the office and will not be able to respond until [Date of Return]. For urgent matters, please contact [Alternative Contact Information]. Otherwise, I will respond to your email upon my return.\n\nBest regards,\n[Your Name]'
  • 'Hello,\n\nI am currently on a business trip and will have limited access to email until [Date of Return]. I will do my best to respond to your message as soon as possible upon my return. For urgent matters, please contact [Alternative Contact Information].\n\nThank you for your understanding.\n\nKind regards,\n[Your Name]'
Read receipts or delivery confirmation
  • 'Dear [Recipient],\n\nI hope this email finds you well. I am writing to confirm the receipt of the email I sent to you earlier today with the subject "[Your Subject]".\n\nIn order to ensure that the message has been successfully received and reviewed on your end, I kindly request that you provide a read receipt or confirm the delivery status of the email at your earliest convenience.\n\nYour confirmation would greatly assist me in ensuring that the necessary information has been communicated effectively.\n\nThank you for your attention to this matter. Please don't hesitate to reach out if you require any further clarification or assistance.\n\nBest regards,\n\n[Your Name]\n[Your Position/Title]\n[Your Contact Information]'
  • 'Dear [Recipient's Name],\n\nThis is to inform you that your email with the subject "Important Update" sent on [Date and Time] has been successfully read by the recipient. You can now be assured that your message has been received and acknowledged.\n\nIf you have any further questions or require additional assistance, please feel free to reach out.\n\nThank you for choosing Gmail.\n\nSincerely,\nThe Gmail Team'
  • 'Dear [Sender's Name],\n\nWe are pleased to inform you that your email with the subject "[Email Subject]" sent on [Date and Time] has been successfully read by the recipient. Your message has been acknowledged and received.\n\nShould you have any further questions or concerns, please feel free to reach out to us.\n\nThank you for choosing our services.\n\nBest regards,\n[Your Name]'
Do-not-reply or no-reply emails (explicitly mentioned in email)
  • 'Dear [Recipient],\n\nPlease be advised that this email is for informational purposes only. No reply is required or monitored.\n\nWe are reaching out to provide you with [specific information, update, or notification] regarding [briefly mention the subject matter].\n\nIf you have any questions or require further assistance regarding the content of this email, please contact our support team at [support email or phone number].\n\nThank you for your attention to this matter.\n\nBest regards,\n\n[Your Name]\n[Your Position/Department (if applicable)]\n[Your Company Name]\n[Your Contact Information]'
  • 'Dear [Recipient],\n\nWe are writing to inform you about a recent update related to [briefly describe the topic or subject].\n\nPlease be aware that this email is sent from a do-not-reply address, and responses to this email will not be monitored. If you have any questions or need further clarification regarding the update, please reach out to our support team at [support email/phone number].\n\nThank you for your attention to this notification.\n\nBest regards,\n[Your Name]\n[Your Position/Department (if applicable)]\n[Your Company/Organization Name]\n\n'
  • "Dear [Recipient],\n\nWe hope this message finds you well. We're reaching out to inform you about an important update regarding [briefly mention the subject matter].\n\nPlease note that this email is for informational purposes only, and no response is necessary. Should you have any questions or concerns regarding the update, please don't hesitate to reach out to us at [contact email/phone].\n\nThank you for your attention to this matter.\n\nBest regards,\n[Your Name]\n[Your Position/Department (if applicable)]\n[Your Company/Organization Name]\n\n\n\n\n"
Reminders
  • "Dear [Recipient],\n\nI hope this email finds you well. Just a friendly reminder about [brief description of the reminder topic].\n\n[Add any relevant details or instructions related to the reminder.]\n\nThank you for your attention to this matter. If you have any questions or need further assistance, please don't hesitate to contact me.\n\nBest regards,\n\n[Your Name]\n[Your Position/Title]\n[Your Contact Information]\n\n\n\n\n\n"
  • "Dear [Recipient],\n\nI hope this email finds you well. This is just a friendly reminder that payment for [Invoice/Service/Product] is due on [Due Date].\n\n[Include any relevant details about the payment, such as amount, invoice number, and payment methods.]\n\nPlease ensure to process the payment by the due date to avoid any late fees or disruptions to your service.\n\nIf you have any questions or need assistance with the payment process, please don't hesitate to contact our billing department at [Billing Contact Information].\n\nThank you for your prompt attention to this matter.\n\nBest regards,\n[Your Name]\n[Your Position/Department]\n[Your Company Name]\n[Your Contact Information]"
  • 'Dear [Recipient],\n\nI hope this email finds you well. Just a quick reminder that we have a scheduled meeting on [Date] at [Time].\n\n[Include any relevant details about the meeting, such as agenda items, location, or virtual meeting link.]\n\nPlease ensure to mark your calendar and make necessary preparations for the meeting. Your participation and input are valuable to the success of our discussion.\n\nIf you have any scheduling conflicts or need to propose agenda topics, please let us know as soon as possible.\n\nLooking forward to our productive meeting.\n\nBest regards,\n[Your Name]\n[Your Position/Department]\n[Your Company Name]\n[Your Contact Information]'
Security Alerts
  • "Dear [Recipient],\n\nWe are writing to inform you about an urgent security alert that requires your immediate attention.\n\n[Describe the security issue or threat briefly and clearly.]\n\nTo ensure the safety and integrity of your account/data, we highly recommend taking the following actions immediately:\n\nChange your password: Please reset your password using a strong and unique combination of characters.\nEnable two-factor authentication (2FA): Add an extra layer of security to your account by enabling 2FA if you haven't already done so.\nReview recent account activity: Check for any suspicious or unauthorized activities and report them to our support team immediately.\nIf you have any concerns or require assistance with securing your account, please contact our security team at [security email or phone number].\n\nYour prompt attention to this matter is crucial in safeguarding your information and preventing potential security breaches.\n\nThank you for your cooperation and understanding.\n\nBest regards,\n\n[Your Name]\n[Your Position/Department (if applicable)]\n[Your Company Name]\n[Your Contact Information]"
  • "Dear [Recipient],\n\nWe are writing to inform you about a potential phishing attempt that has been detected targeting users of our platform.\n\n[Describe the phishing attempt briefly, including any relevant details or indicators of the phishing email.]\n\nTo safeguard your account and personal information, please remember the following precautions:\n\nDo not click on any links or download attachments from suspicious emails.\nVerify the sender's email address and look for any signs of spoofing or impersonation.\nReport any suspicious emails to our security team immediately for further investigation.\nIf you have inadvertently clicked on any links or provided any sensitive information, please change your account password immediately and notify our support team for assistance.\n\nThank you for your attention to this matter and for helping us maintain a secure environment for all our users.\n\nBest regards,\n\n[Your Name]\n[Your Position/Department (if applicable)]\n[Your Company Name]\n[Your Contact Information]"
  • 'Dear [Recipient],\n\nWe regret to inform you that your account has been temporarily locked due to multiple failed login attempts.\n\n[Explain the reason for the account lockout, such as exceeding the maximum allowed login attempts or suspicious login activity.]\n\nTo regain access to your account, please follow these steps:\n\nVisit our login page and click on the "Forgot Password" link.\nFollow the instructions to reset your password securely.\nAfter resetting your password, you will be able to log in to your account as usual.\nIf you believe this lockout was initiated in error or have any concerns about the security of your account, please contact our support team immediately for assistance.\n\nThank you for your cooperation and understanding.\n\nBest regards,\n\n[Your Name]\n[Your Position/Department (if applicable)]\n[Your Company Name]\n[Your Contact Information]'

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("mohamednihal/noReply")
# Run inference
preds = model("Hello,

Thank you for your email. I am currently attending a conference and may have limited access to email until [Date of Return]. I will respond to your message as soon as possible upon my return. For urgent matters, please contact [Alternative Contact Information].

Best regards,
[Your Name]")

Training Details

Training Set Metrics

Training set Min Median Max
Word count 44 85.24 170
Label Training Sample Count
Automatic subscription confirmation emails 5
Do-not-reply or no-reply emails (explicitly mentioned in email) 5
Email Delivery failure notifications 5
Out-of- office replies 5
Password reset emails 5
Promotional emails 5
Read receipts or delivery confirmation 5
Reminders 5
Security Alerts 5
System Alerts 5

Training Hyperparameters

  • batch_size: (2, 2)
  • num_epochs: (1, 1)
  • max_steps: -1
  • sampling_strategy: oversampling
  • num_iterations: 20
  • body_learning_rate: (2.887681170264626e-05, 2.887681170264626e-05)
  • head_learning_rate: 2.887681170264626e-05
  • 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.001 1 0.1811 -
0.05 50 0.3964 -
0.1 100 0.0705 -
0.15 150 0.0115 -
0.2 200 0.0477 -
0.25 250 0.0022 -
0.3 300 0.0044 -
0.35 350 0.0017 -
0.4 400 0.001 -
0.45 450 0.0001 -
0.5 500 0.0006 -
0.55 550 0.0008 -
0.6 600 0.0003 -
0.65 650 0.0006 -
0.7 700 0.0003 -
0.75 750 0.0017 -
0.8 800 0.0001 -
0.85 850 0.0002 -
0.9 900 0.0 -
0.95 950 0.0002 -
1.0 1000 0.0002 -
0.001 1 0.0001 -
0.05 50 0.0002 -
0.1 100 0.0014 -
0.15 150 0.008 -
0.2 200 0.0017 -
0.25 250 0.0018 -
0.3 300 0.0187 -
0.35 350 0.0021 -
0.4 400 0.0001 -
0.45 450 0.0 -
0.5 500 0.0003 -
0.55 550 0.0001 -
0.6 600 0.0 -
0.65 650 0.0002 -
0.7 700 0.0 -
0.75 750 0.0003 -
0.8 800 0.0 -
0.85 850 0.0 -
0.9 900 0.0001 -
0.95 950 0.0001 -
1.0 1000 0.0 -
0.001 1 0.0 -
0.05 50 0.0001 -
0.1 100 0.0018 -
0.15 150 0.0001 -
0.2 200 0.0042 -
0.25 250 0.0009 -
0.3 300 0.0001 -
0.35 350 0.0018 -
0.4 400 0.0002 -
0.45 450 0.0001 -
0.5 500 0.0 -
0.55 550 0.0001 -
0.6 600 0.0 -
0.65 650 0.0 -
0.7 700 0.0 -
0.75 750 0.0 -
0.8 800 0.0 -
0.85 850 0.0 -
0.9 900 0.0 -
0.95 950 0.0 -
1.0 1000 0.0 -
0.001 1 0.0 -
0.05 50 0.0 -
0.1 100 0.0005 -
0.15 150 0.0025 -
0.2 200 0.0 -
0.25 250 0.0002 -
0.3 300 0.0 -
0.35 350 0.0003 -
0.4 400 0.0001 -
0.45 450 0.0 -
0.5 500 0.0 -
0.55 550 0.0 -
0.6 600 0.0 -
0.65 650 0.0 -
0.7 700 0.0 -
0.75 750 0.0 -
0.8 800 0.0 -
0.85 850 0.0 -
0.9 900 0.0 -
0.95 950 0.0 -
1.0 1000 0.0 -

Framework Versions

  • Python: 3.10.12
  • SetFit: 1.0.3
  • Sentence Transformers: 2.4.0
  • Transformers: 4.37.2
  • PyTorch: 2.1.0+cu121
  • Datasets: 2.17.1
  • Tokenizers: 0.15.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}
}
Downloads last month
165,157
Safetensors
Model size
109M params
Tensor type
F32
·

Finetuned from