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
Change order
Delivery (status)
ERA/RMA
Expedite
Finance
  • "Fwd: 2024 Purchasing & Payment Guide Hi Anita and the team, Find file attached with the most current Purchasing & Payment Guide which includes new order cancellation terms (section 2.3). Thank you, Piotr ---------- Forwarded message --------- From: Hannah Maskell [email protected] Date: Fri, Jan 5, 2024 at 5:10\u202fPM Subject: 2024 Purchasing & Payment Guide To: Piotr Kopkowicz [email protected], Tanya Vasylevska [email protected] Hi Piotr & Tanya, Happy New Year! As requested, please find attached the 2024 Purchasing & Payment Guide. Order Cancellation terms are at section 2.3. Thanks! Hannah Hannah Maskell (she/her) Channel Operations Specialist m: +447739866974 Motorola Solutions UK Limited Registered Office: Nova South, 160 Victoria Street, London, SW1E 5LB, United Kingdom. Reg. No.: 912182 - England. VAT No.: GB260311213. Private Limited Company. This email and any attachments are for the authorized recipient's use only. If you receive this email in error, please immediately delete it from your system and notify the sender. You must not disclose, print, re-transmit, store, copy or rely on any part of this email and any attachments if you are not the authorized recipient. This email and any attachments are confidential and may contain confidential information and/or copyright material of Motorola Solutions, Inc. -- For more information on how and why we collect your personal information, please visit our Privacy Policy https://www.motorolasolutions.com/en_us/about/privacy-policy.html?elqTrackId=8980d888905940e39a2613a7a3dcb0a7&elqaid=2786&elqat=2#privacystatement."
  • 'Closed Case Response: Case #: 03399502 Parent Case # 03399502'
  • 'RE: Case #03334732 has been created - RE: Your Motorola Solutions Order Confirmation Number EC110655546 for PO Number PO-001717-1 Dear Ahmad, Payment recived: Dear OM, Order 2100469330 is now released. Thanks, Iza Regards, Izabela Halikowska Account Receivable Specialist Motorola Solutions Inc. Phone: For more information on how and why we collect your personal information, please visit our Privacy Policy.'
Order
Order Information Request
Other
Product
  • "Re: 3693926 SA_STCSC_TETRA SPARES- Deadline is 9 JAN 2024 Hi Order Management Team Are you able to provide estimated lead times for the following items please? - NNTN8020 - NNTN8153 - PMLN7464 - PMMN4075 Many thanks in advance... Hannah. Services Support Team I am working flexibly and whilst it suits me to email now, I do not expect a response or action outside of your own working hours ;-) Please note I will be OOO on the following dates with no access to my e-mails... 2024 Dates... Monday 26th February to Monday 4th March Inclusive Tuesday 30th April to Friday 10th May Inclusive Training - None Planned Please visit the UK Employee Wellbeing https://batchat.motorolasolutions.com/home/ls/community/uk-employee-wellbeing Page... Registered Office: Nova South, 160 Victoria Street, London, SW1E 5LB, United Kingdom Reg. No: 912182 - England
RMA
  • 'New Case - RMA_$IN_3203320728_MONROE COUNTY CENTRAL EMERGENCY DISPATCH CENTER_1209114355_QUOTE-3203514453 / 04356447 Parent Case # 04356447'
  • 'New Case - RMA$GA_3203509921_CLAYTON COUNTY CENTRAL SERVICES_1000289159_RMA#3203578428 / 04518515 Parent Case # 04518515'
  • 'RMA$_TN_3203109971_EASTMAN CHEMICAL CO_1000745870_QUOTE-#_EBS_3203280547 Hello Cofera, Can you please process this order for Eastman? Please see the approval and file attached below. [image: image.png] Thank You Best Regards, -- Harris Capell Customer Engagement Specialist Commercial Markets M*:* 872-772-1219 E: [email protected] -- For more information on how and why we collect your personal information, please visit our Privacy Policy https://www.motorolasolutions.com/en_us/about/privacy-policy.html?elqTrackId=8980d888905940e39a2613a7a3dcb0a7&elqaid=2786&elqat=2#privacystatement.'
Spam
  • "Re: SERVICOM HI-TECH, Redditch / UK Export 24DE0080 #MP awb 345237495 Am Mo., 8. Jan. 2024 um 14:10 Uhr schrieb EMEA Export Team PL < [email protected]>: > Dear All, > > > Please find attached the Export#24DE0080 & documents for the > following orders: > > > Reference type Number # > Export ref 24DE0080 > Forwarder TNT EX > Service type ROAD > DANGEROUS GOODS YES > DANGEROUS GOODS CLASS/ GROUP > To mention on AWB PO# SER26222& LI-ION BATT AS PER ADR/IMDG SP188 > Special instructions > Purchase Order SER26222 > MSI Packing list 9110608390 > MSI Sales Order 2100445703 > MRN > 24DE705424031455B0 > > > Thanks > Michal > > Michał Papkala > Motorola Solutions (Schenker) > > e: m [email protected] > [email protected] > > This email and any attachments are for the authorized recipient's use > only. If you receive this email in error, please immediately delete it from > your system and notify the sender. You must not disclose, print, > re-transmit, store, copy or rely on any part of this email and any > attachments if you are not the authorized recipient. This email and any > attachments are confidential and may contain confidential information > and/or copyright material of Motorola Solutions, Inc. > -- Mit freundlichen Grüßen /best regards Patrick Bielefeld BC Cargo In-House Team Motorola/CTDI Alsdorf Konrad - Zuse - Str. 37 52477 Alsdorf +49(0)2404-67556225 [email protected] -- For more information on how and why we collect your personal information, please visit our Privacy Policy https://www.motorolasolutions.com/en_us/about/privacy-policy.html?elqTrackId=8980d888905940e39a2613a7a3dcb0a7&elqaid=2786&elqat=2#privacystatement."
  • 'Packlist 01/30/24 Kind Regards Paulina Kwiecien-Hrechorowicz Order Management Coordinator Motorola Solutions, Inc. motorolasolutions.com O: +48 (12) 221-31-09 E: [email protected] -- For more information on how and why we collect your personal information, please visit our Privacy Policy https://www.motorolasolutions.com/en_us/about/privacy-policy.html?elqTrackId=8980d888905940e39a2613a7a3dcb0a7&elqaid=2786&elqat=2#privacystatement.'
  • "Re: Shipment for XEVA LTD, Basingstoke / UK - EXPORT 24DE0394 #SG Dear All, Please find attached the EXPORT # 24DE0394 packing list & invoice as well as the EX1 the following orders Reference type Number # Export ref *24DE0394 * Forwarder TNT EX Service type ROAD DANGEROUS GOODS NO DANGEROUS GOODS CLASS/ GROUP To mention on AWB *Please mention PO# 13398, 12668, 12676, 12697, 13009, 13139 * Special instructions Purchase Order *13398, 12668, 12676, 12697, 13009, 13139 * MSI Packing list 9110667705, 9110667767, 9110667771, 9110667786, 9110667837, 9110667851 MSI Sales Order 2100478772, 2100450112, 2100450339, 2100451060, 2100462592, 2100467948 MRN 24DE705424900367B4 Szymon Gardziel Motorola Solutions (Schenker) e: [email protected] [email protected] This email and any attachments are for the authorized recipient's use only. If you receive this email in error, please immediately delete it from your system and notify the sender. You must not disclose, print, re-transmit, store, copy or rely on any part of this email and any attachments if you are not the authorized recipient. This email and any attachments are confidential and may contain confidential information and/or copyright material of Motorola Solutions, Inc. -- For more information on how and why we collect your personal information, please visit our Privacy Policy https://www.motorolasolutions.com/en_us/about/privacy-policy.html?elqTrackId=8980d888905940e39a2613a7a3dcb0a7&elqaid=2786&elqat=2#privacystatement."
Warranty

Evaluation

Metrics

Label Accuracy
all 0.7385

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("Ramyashree/lmr-finetuned-model")
# Run inference
preds = model("New Case - $63,557.36_MD_Direct_ST. JOHN'S COLLEGE_PO#121224.01_3010481722_QUOTE-2850805_EBS_3203604634 / 04579062  Parent Case # 04579062")

Training Details

Training Set Metrics

Training set Min Median Max
Word count 10 240.9259 2209
Label Training Sample Count
Change order 8
Delivery (status) 8
ERA/RMA 7
Expedite 6
Finance 4
Order 8
Order Information Request 8
Other 4
Product 7
RMA 8
Spam 8
Warranty 5

Training Hyperparameters

  • batch_size: (4, 4)
  • num_epochs: (4, 4)
  • max_steps: -1
  • sampling_strategy: oversampling
  • body_learning_rate: (2e-05, 1e-05)
  • head_learning_rate: 0.01
  • 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: True

Training Results

Epoch Step Training Loss Validation Loss
0.0007 1 0.3845 -
0.0334 50 0.1797 -
0.0668 100 0.1946 -
0.1002 150 0.1727 -
0.1336 200 0.1856 -
0.1670 250 0.1368 -
0.2004 300 0.14 -
0.2338 350 0.1256 -
0.2672 400 0.1309 -
0.3006 450 0.1131 -
0.3340 500 0.1065 -
0.3674 550 0.0872 -
0.4008 600 0.0813 -
0.4342 650 0.0737 -
0.4676 700 0.0557 -
0.5010 750 0.0652 -
0.5344 800 0.0408 -
0.5678 850 0.0318 -
0.6012 900 0.0432 -
0.6346 950 0.0299 -
0.6680 1000 0.0264 -
0.7014 1050 0.0228 -
0.7348 1100 0.0167 -
0.7682 1150 0.0166 -
0.8016 1200 0.0136 -
0.8350 1250 0.0112 -
0.8684 1300 0.0168 -
0.9018 1350 0.0102 -
0.9352 1400 0.0125 -
0.9686 1450 0.0193 -
1.0 1497 - 0.1208
1.0020 1500 0.007 -
1.0354 1550 0.0102 -
1.0688 1600 0.0064 -
1.1022 1650 0.0103 -
1.1356 1700 0.0063 -
1.1690 1750 0.0056 -
1.2024 1800 0.0027 -
1.2358 1850 0.0063 -
1.2692 1900 0.007 -
1.3026 1950 0.0089 -
1.3360 2000 0.0106 -
1.3694 2050 0.0129 -
1.4028 2100 0.0036 -
1.4362 2150 0.0017 -
1.4696 2200 0.0064 -
1.5030 2250 0.0136 -
1.5364 2300 0.0074 -
1.5698 2350 0.0099 -
1.6032 2400 0.0019 -
1.6366 2450 0.016 -
1.6700 2500 0.0018 -
1.7034 2550 0.005 -
1.7368 2600 0.0064 -
1.7702 2650 0.0081 -
1.8036 2700 0.0051 -
1.8370 2750 0.0085 -
1.8704 2800 0.006 -
1.9038 2850 0.0021 -
1.9372 2900 0.0073 -
1.9706 2950 0.005 -
2.0 2994 - 0.1245
2.0040 3000 0.0036 -
2.0374 3050 0.0009 -
2.0708 3100 0.0034 -
2.1042 3150 0.0096 -
2.1376 3200 0.0028 -
2.1710 3250 0.0128 -
2.2044 3300 0.0026 -
2.2378 3350 0.0118 -
2.2712 3400 0.0061 -
2.3046 3450 0.0028 -
2.3380 3500 0.0058 -
2.3714 3550 0.0068 -
2.4048 3600 0.0016 -
2.4382 3650 0.0068 -
2.4716 3700 0.008 -
2.5050 3750 0.0046 -
2.5384 3800 0.0021 -
2.5718 3850 0.0024 -
2.6052 3900 0.0018 -
2.6386 3950 0.0078 -
2.6720 4000 0.0068 -
2.7054 4050 0.0103 -
2.7388 4100 0.0124 -
2.7722 4150 0.0051 -
2.8056 4200 0.0038 -
2.8390 4250 0.0033 -
2.8724 4300 0.0017 -
2.9058 4350 0.0113 -
2.9392 4400 0.0015 -
2.9726 4450 0.0038 -
3.0 4491 - 0.1217
3.0060 4500 0.0069 -
3.0394 4550 0.0046 -
3.0728 4600 0.004 -
3.1062 4650 0.0091 -
3.1396 4700 0.0069 -
3.1730 4750 0.0032 -
3.2064 4800 0.0079 -
3.2398 4850 0.003 -
3.2732 4900 0.0033 -
3.3066 4950 0.0015 -
3.3400 5000 0.0053 -
3.3734 5050 0.0054 -
3.4068 5100 0.0022 -
3.4402 5150 0.0063 -
3.4736 5200 0.0073 -
3.5070 5250 0.0111 -
3.5404 5300 0.0091 -
3.5738 5350 0.0026 -
3.6072 5400 0.0038 -
3.6406 5450 0.0081 -
3.6740 5500 0.0029 -
3.7074 5550 0.0104 -
3.7408 5600 0.0016 -
3.7742 5650 0.002 -
3.8076 5700 0.003 -
3.8410 5750 0.0023 -
3.8744 5800 0.0028 -
3.9078 5850 0.005 -
3.9412 5900 0.0011 -
3.9746 5950 0.001 -
4.0 5988 - 0.1273

Framework Versions

  • Python: 3.11.11
  • SetFit: 1.1.1
  • Sentence Transformers: 3.3.1
  • Transformers: 4.47.1
  • PyTorch: 2.5.1+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
22.7M 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 Ramyashree/lmr-finetuned-model

Finetuned
(218)
this model

Evaluation results