CoolFace
Modelpublic

truefoundry/setfit-mxbai-embed-xsmall-v1-test

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes6downloads
Model Card

SetFit with mixedbread-ai/mxbai-embed-xsmall-v1

This is a SetFit model that can be used for Text Classification. This SetFit model uses mixedbread-ai/mxbai-embed-xsmall-v1 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: mixedbread-ai/mxbai-embed-xsmall-v1
  • —Classification head: a LogisticRegression instance
  • —Maximum Sequence Length: 512 tokens
  • —Number of Classes: 31 classes <!-- - Training Dataset: Unknown --> <!-- - Language: Unknown --> <!-- - License: Unknown -->

Model Sources

Model Labels

LabelExamples
externalrxtransfer<ul><li>'these Pharmacy to call Walgreens so they can transfer a RINVOQ TAB and EQ HYDROCORTISONE MAXIMU M STRENGTH CRE prescription'</li><li>'I do not accept alternative to SILACE SYP and ISENTRESS POW. If you don’t have it tell me so I may use alternate Pharmacy for this prescription. Let me know asap.'</li><li>'I would like you to transfer LORAZEPAM VIA and ENFAMIL NEUROPRO INFANT LIQ prescription to a walmart pharmacy that does have it please'</li></ul>
rx_cancel<ul><li>'cancel all autofill of MIDODRINE HCL TAB and BASIS EXTRA DRY BAR?'</li><li>'trying to cancel a prescription for SLEEP OVERS SMALL/MEDIUM MIS and FLANDERS BUTTOCKS OIN?'</li><li>'cancellation for a MELATONIN LIQ and ALIVE MENS GUMMY MULTIVITAMIN CHW?'</li></ul>
store_faq<ul><li>'Are medications available at the store in 15106?'</li><li>'Are money order services offered at the store in 22180?'</li><li>'How do I change the insurance on file for LIQUID HOPE PEPTIDE HIGH PROTEIN LIQ and CYRED EQ TAB at 89113?'</li></ul>
rx_refill<ul><li>'will you fill my ZILBRYSQ INJ and FAST-HEAT HEATING PAD PAD?'</li><li>'I need to have SKIN REPAIR LOT and CEFUROXIME SODIUM INJ refilled'</li><li>'I need the prescription for Basaglar 100 unit filled today.my pharmacy was out of stock.'</li></ul>
rxactionnotes_status<ul><li>"there's a mistake in my prescription to be put on hold for the PSEUDOEPHEDRINE HCL TAB and EFAVIRENZ TAB?"</li><li>'Ok this is a new LANCETS ULTRA THIN 30G MIS and ASPIRIN POW prescription I don’t understand why it is not allowed to be filled?'</li><li>'Why are the SPIRIVA RESPIMAT SPR and FT HYDROGEN PEROXIDE SOL on hold?'</li></ul>
cancelvaccineappointment<ul><li>'How do I cancel my Rabies vaccine appointment at the prescription drug plan?'</li><li>'Can I cancel my Rabies vaccine appointment at the VA health plan?'</li><li>'How do I confirm the cancellation of my RSV-(Respiratory Syncytial Virus) vaccine appointment?'</li></ul>
drug_usage<ul><li>'when can I take my KNEE SUPPORT/CRISS-CROSS/ELASTIC/SMALL MIS and HM DRY EYE RELIEF SOL?'</li><li>'need to ask a question about directions to take a KNEE SUPPORT/NEOPRENE/OVAL PAD/LARGE MIS and EQ DAYTIME COLD & FLU MULTI-SYMPTOM RELIEF LIQ?'</li><li>'in antibiotic mixed with a SM CALCIUM/VITAMIN D3 TAB and DOLISHALE TAB that I take every day that they want me to cut in half questionable?'</li></ul>
druginsurancecoverage<ul><li>'check insurance coverage for PEN NEEDLES 31GX8MM (5/16) MIS and EQL COTTON BALLS SUPER JUMBO MIS?'</li><li>'get pharmacist my insurance to cover for the LUMINEUX WHITENING TOOTHPASTE PST and BD INSULIN SYRINGE/0.5ML/29G X 12.7MM SYN?'</li><li>'I need my insurance information on file for TGT BLOOD PRESSURE MONITOR/AUTOMATIC MIS and GILTUSS BUCALSEP SPR?'</li></ul>
getvaccineappointment<ul><li>'Can I get a RSV-(Respiratory Syncytial Virus) vaccine appointment after hours?'</li><li>'can you schedule a Dtap DT vaccination appointment on Monday'</li><li>'Whooping Cough-(Adacel) vaccine prescription schedule'</li></ul>
available_vaccine<ul><li>'what is the current RSV-(Respiratory Syncytial Virus) vaccine being used'</li><li>'What about the availability of Typhoid ?'</li><li>'confirming Tdap available'</li></ul>
rephrase<ul><li>'Could you run that by me again? one more time'</li><li>"Sorry I didn't catch that. a little louder"</li><li>'you told me'</li></ul>
store_timezone<ul><li>'Can you tell me if the store in REDDING is in the MST time zone?'</li><li>'Can you provide the time zone for the store at 189 SOUTH TURNPIKE ROAD?'</li><li>'Can you provide the time zone for the store at 760 MILES RD.?'</li></ul>
hold_on<ul><li>"I would like to be put on hold until 10 minutes? and I'll wait on hold until someone can assist me."</li><li>'One second I need to check my email.'</li><li>'hold on just a minute'</li></ul>
healthcare<ul><li>'hello i am nurse Is there a patient counseling sheet available for WRIST SPLINT/NEOPRENE/LEFT/MEDIUM MIS?'</li><li>'Doctor I need to transfer patient prescription for ORAL ANALGESIC MAXIMUM STRENGTH GEL to your pharmacy.'</li><li>"i am Healthcare Provider from Dr's office Is NESTABS TAB safe for pregnant women?"</li></ul>
drugdosageinstructions<ul><li>'MURI-LUBE OIL and D3 5000 CAP? I need some instructions on the medication'</li><li>'dosage of a LIDOCAINE HCL POW and CLOBETASOL PROPIONATE CRE?'</li><li>'How much ROGAINE MENS AER and CONTOUR NEXT EZ BLOOD GLUCOSE MONITORING SYSTEM KIT should I take daily?'</li></ul>
drug_interactions<ul><li>'find out about a drug interaction with OMRON 7 SERIES BLOOD PRESSURE MONITOR/UPPER ARM/BLUETOOTH MIS and FABRIC BANDAGES/ASSORTED MIS?'</li><li>"I want to understand if there's an interaction between 2 medications of XYWAV SOL and GERI-TUSSIN LIQ that I took today?"</li><li>'I need to know about specific TRANSPORE SURGICAL TAPE 1X10YDS TAP and AYR NASAL MIST ALLERGY & SINUS HYPERTONIC SALINE SPR drug interactions?'</li></ul>
store_hours<ul><li>'will that stores open on Yom Kippur - October 12?'</li><li>'I was wanting to know what the store hours are for this weekend'</li><li>"is the front door open on Valentine's Day - February 14"</li></ul>
store_directions<ul><li>'how to find this store from my home address 3700 BRADFORDVILLE RD'</li><li>'Can you give me directions to the store at 06117?'</li><li>'is this store near to FRESNO city'</li></ul>
drug_information<ul><li>'I want to find out about ROZLYTREK CAP and ADULT BLOOD PRESSURE CUFF/LARGE KIT?'</li><li>'What are the uses of NON-ASPIRIN PAIN RELIEF EXTRA STRENGTH TAB and CRANBERRY CONCENTRATE TRIPLE STRENGTH ULTRA/VITAMIN C CAP?'</li><li>'questions about my medicine'</li></ul>
rx_expedite<ul><li>'I would like a call back from the pharmacy to pick up my ULTRATHON INSECT REPELLENT 8 AER and AIMSCO LUBRICATED MIS possibly 2 days early due to a medical procedure happening on Monday?'</li><li>'expedite refill of MEDIHONEY CALCIUM ALGINATE DRESSING/2X2 PAD and ADVOCATE ALCOHOL PREP PADS PAD?'</li><li>"I need an auto refill sooner than the date it's currently scheduled for MONOJECT LIFESHIELD BLUNTCANNULA/LUER LOCK SYR/3ML/18G X 1 MIS and EQ COMPLETE CHEWABLE MULTIVITAMIN CHILDRENS CHW ?"</li></ul>
drugsideeffects<ul><li>'Are there any common side effects for SSS 10%-5% CRE and FINGERSTIX LANCETS MIS?'</li><li>'is my prescription for SANDOSTATIN LAR DEPOT KIT and DIGESTIVE ADVANTAGE CAP cancerous?'</li><li>'my WAL-ZYR ALL DAY ALLERGY CHILDRENS SOL and GNP VITAMIN B-1 TAB making me sick?'</li></ul>
rx_status<ul><li>'check prescription status on my NAROPIN INJ and AUGMENTIN TAB. When will it be ready?'</li><li>'check prescription status on my SENNA-TIME S TAB and DROPLET PEN NEEDLES 32GX8MM PEN. When will it be ready?'</li><li>'what was the other medication refill'</li></ul>
rxdrugprice<ul><li>'how much is it going to cost for MICROPORE SURGICAL TAPE 1X1-1/2YDS TAP and DROPLET INSULIN SYRINGE U-100/1ML/31G X 5/16 SYN?'</li><li>"what's the cost of PREFERRED PLUS UNIFINE PENTIPS 29G X 12MM MIS and EQ COUGH DM SUS and PREFERRED PLUS UNIFINE PENTIPS 29G X 12MM MIS and EQ COUGH DM SUS?"</li><li>'cost of QC CHILDRENS CHEWABLE COMPLETE CHW and AZELASTINE HCL SPR and a transfer?'</li></ul>
internalrxtransfer<ul><li>"Please transfer the prescription for RITALIN LA CAP and COMFORT TOUCH PEN NEEDLES/32G X 4MM MISwhich is on hold because it's on back order but when it comes in I would like to have it delivered please"</li><li>'transfer or receive a new SUR-FIT NATURA DRAINABLE POUCH/10/2-SIDE FLOCKING 1-3/4 MIS and CILOXAN SOL prescription'</li><li>'need to request a transfer for VITABEX CAP and AUROVELA 24 FE TAB'</li></ul>
createvaccineappointment<ul><li>'What documents do I need for my Meningitis vaccine appointment?'</li><li>'Can I schedule a Flu vaccine appointment for next week?'</li><li>'I would like to make an appointment for the Flu shot and the Flu shot'</li></ul>
drug_availability<ul><li>'SANDOSTATIN LAR DEPOT KIT and AVANDIA TAB in stock?'</li><li>'do you have this QC BORDER ISLAND GAUZE PAD 2X2 PAD and ARGYLE STERILE SALINE SOL?'</li><li>'what is available for MIRENA IUD and BUDESONIDE CAP?'</li></ul>
store_connect<ul><li>'let me talk to the front store technician in 74012.'</li><li>'I need to check if a product is available at the store in 432 S. MAIN ST..'</li><li>'Can you connect me to the front store at 615-621 BELMONT AVENUE to check my unpicked item?'</li></ul>
thank<ul><li>'Starbucks our best'</li><li>'no okay thank you'</li><li>"no that'll be all"</li></ul>
rx_delivery<ul><li>'deliver VYVANSE CHW and IMIPRAMINE HYDROCHLORIDE TAB prescription?'</li><li>'um delivery of TWYNEO CRE and GLUCOCARD VITAL BLOOD GLUCOSE MONITORING SYSTEM KIT for?'</li><li>'RA ENEMA ENE and BABY WIPES MIS delivery to my apartment in silver Spring.Phyllis?'</li></ul>
live_pharmacist<ul><li>'yes operator please'</li><li>'give me a call'</li><li>'I need to talk to someone about refill prescriptions'</li></ul>
store_address<ul><li>'Is there a pharmacy in AVONDALE tto pickup UNIFINE ULTRA PEN NEEDLE/31GX8MM MIS and GNP STERILE LANCETS 30G MIS? Please provide the address?'</li><li>'Can you provide the location of the pharmacy in 98374 zipcode ?'</li><li>'What is the store address for the pharmacy in NORTHBOROUGH?'</li></ul>

Evaluation

Metrics

LabelAccuracy
all0.7935

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("setfit_model_id")
# Run inference
preds = model("I'm happy to wait on hold.  thank you.")

<!--

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 count114.193556
LabelTraining Sample Count
available_vaccine8
cancelvaccineappointment8
createvaccineappointment8
drug_availability8
drugdosageinstructions8
drug_information8
druginsurancecoverage8
drug_interactions8
drugsideeffects8
drug_usage8
externalrxtransfer8
getvaccineappointment8
healthcare8
hold_on8
internalrxtransfer8
live_pharmacist8
rephrase8
rxactionnotes_status8
rx_cancel8
rx_delivery8
rxdrugprice8
rx_expedite8
rx_refill8
rx_status8
store_address8
store_connect8
store_directions8
store_faq8
store_hours8
store_timezone8
thank8

Training Hyperparameters

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

Training Results

EpochStepTraining LossValidation Loss
0.000510.1621-
0.0269500.1732-
0.05381000.1495-
0.08061500.1129-
0.10752000.0773-
0.13442500.062-
0.16133000.0452-
0.18823500.0435-
0.21514000.0354-
0.24194500.0283-
0.26885000.0284-
0.29575500.0236-
0.32266000.0218-
0.34956500.0182-
0.37637000.019-
0.40327500.0159-
0.43018000.0161-
0.45708500.0124-
0.48399000.0133-
0.51089500.0154-
0.537610000.0137-
0.564510500.0125-
0.591411000.0164-
0.618311500.0125-
0.645212000.0092-
0.672012500.0129-
0.698913000.0109-
0.725813500.0115-
0.752714000.0109-
0.779614500.0106-
0.806515000.0111-
0.833315500.0092-
0.860216000.0073-
0.887116500.0081-
0.914017000.0089-
0.940917500.01-
0.967718000.0084-
0.994618500.008-
1.01860-0.0890

Framework Versions

  • —Python: 3.12.0
  • —SetFit: 1.1.1
  • —Sentence Transformers: 3.4.1
  • —Transformers: 4.49.0
  • —PyTorch: 2.4.1
  • —Datasets: 3.4.1
  • —Tokenizers: 0.21.1

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