Shankhdhar/classifier_test_model
06
1---2library_name: setfit3tags:4- setfit5- sentence-transformers6- text-classification7- generated_from_setfit_trainer8base_model: sentence-transformers/paraphrase-mpnet-base-v29metrics:10- accuracy11widget:12- text: I'm looking for a bracelet as a birthday gift. What do you recommend?13- text: I recently ordered a Leafy Bling Silver Ring but haven't received any update14 on the delivery status. Can you help me track my order?15- text: What is the Bold and Beautiful Link Ring made of, and could you provide information16 on sizing and care instructions?17- text: What are the latest trends in bracelets that you have in stock?18- text: Can you suggest some minimalist necklaces from your 'Best Sellers - Minimalist'19 range?20pipeline_tag: text-classification21inference: true22model-index:23- name: SetFit with sentence-transformers/paraphrase-mpnet-base-v224 results:25 - task:26 type: text-classification27 name: Text Classification28 dataset:29 name: Unknown30 type: unknown31 split: test32 metrics:33 - type: accuracy34 value: 0.802469135802469135 name: Accuracy36---37 38# SetFit with sentence-transformers/paraphrase-mpnet-base-v239 40This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [sentence-transformers/paraphrase-mpnet-base-v2](https://huggingface.co/sentence-transformers/paraphrase-mpnet-base-v2) as the Sentence Transformer embedding model. A [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance is used for classification.41 42The model has been trained using an efficient few-shot learning technique that involves:43 441. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.452. Training a classification head with features from the fine-tuned Sentence Transformer.46 47## Model Details48 49### Model Description50- **Model Type:** SetFit51- **Sentence Transformer body:** [sentence-transformers/paraphrase-mpnet-base-v2](https://huggingface.co/sentence-transformers/paraphrase-mpnet-base-v2)52- **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance53- **Maximum Sequence Length:** 512 tokens54- **Number of Classes:** 4 classes55<!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->56<!-- - **Language:** Unknown -->57<!-- - **License:** Unknown -->58 59### Model Sources60 61- **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit)62- **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)63- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)64 65### Model Labels66| Label | Examples |67|:------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|68| product policy | <ul><li>'If I receive a defective Choker, what is the process to get a replacement?'</li><li>'Are there any restocking fees for returning a Choker?'</li><li>'What warranty do you offer on Choker products?'</li></ul> |69| product faq | <ul><li>'What sizes is the Sheer Heart Ring available in, and can you provide the price for each size?'</li><li>'Is the Silver Eye Pendant nickel-free and hypoallergenic?'</li><li>'What material is used for the Crystal Drop Earring, and how should I take care of it to prevent tarnishing?'</li></ul> |70| order tracking | <ul><li>"I haven't received an update on my order status for the Rosé Bloom Ring. Could you please provide me with the tracking details?"</li><li>"I recently ordered the Pakhi Handcrafted Earring but I haven't received any shipping confirmation. Could you please update me on the status of my order?"</li><li>"I recently ordered a Whispering Star Silver Ring, but I haven't received any shipment updates. Can you please provide me with the status of my order?"</li></ul> |71| product discoveribility | <ul><li>'What are the latest trends in bracelets that you have in stock?'</li><li>"I'm interested in pendant sets from your 'Gold Plated Jewellery' collection. What options do you offer?"</li><li>"I'm interested in silver bracelets. What options are available in that material?"</li></ul> |72 73## Evaluation74 75### Metrics76| Label | Accuracy |77|:--------|:---------|78| **all** | 0.8025 |79 80## Uses81 82### Direct Use for Inference83 84First install the SetFit library:85 86```bash87pip install setfit88```89 90Then you can load this model and run inference.91 92```python93from setfit import SetFitModel94 95# Download from the 🤗 Hub96model = SetFitModel.from_pretrained("setfit_model_id")97# Run inference98preds = model("What are the latest trends in bracelets that you have in stock?")99```100 101<!--102### Downstream Use103 104*List how someone could finetune this model on their own dataset.*105-->106 107<!--108### Out-of-Scope Use109 110*List how the model may foreseeably be misused and address what users ought not to do with the model.*111-->112 113<!--114## Bias, Risks and Limitations115 116*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*117-->118 119<!--120### Recommendations121 122*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*123-->124 125## Training Details126 127### Training Set Metrics128| Training set | Min | Median | Max |129|:-------------|:----|:--------|:----|130| Word count | 8 | 16.8438 | 31 |131 132| Label | Training Sample Count |133|:------------------------|:----------------------|134| order tracking | 8 |135| product discoveribility | 8 |136| product faq | 8 |137| product policy | 8 |138 139### Training Hyperparameters140- batch_size: (16, 16)141- num_epochs: (4, 4)142- max_steps: -1143- sampling_strategy: oversampling144- body_learning_rate: (2e-05, 1e-05)145- head_learning_rate: 0.01146- loss: CosineSimilarityLoss147- distance_metric: cosine_distance148- margin: 0.25149- end_to_end: False150- use_amp: False151- warmup_proportion: 0.1152- seed: 42153- eval_max_steps: -1154- load_best_model_at_end: True155 156### Training Results157| Epoch | Step | Training Loss | Validation Loss |158|:------:|:----:|:-------------:|:---------------:|159| 0.0208 | 1 | 0.1273 | - |160| 1.0417 | 50 | 0.004 | - |161| 2.0833 | 100 | 0.0005 | - |162| 3.125 | 150 | 0.0005 | - |163 164### Framework Versions165- Python: 3.9.16166- SetFit: 1.0.3167- Sentence Transformers: 2.7.0168- Transformers: 4.40.1169- PyTorch: 2.3.0170- Datasets: 2.19.0171- Tokenizers: 0.19.1172 173## Citation174 175### BibTeX176```bibtex177@article{https://doi.org/10.48550/arxiv.2209.11055,178 doi = {10.48550/ARXIV.2209.11055},179 url = {https://arxiv.org/abs/2209.11055},180 author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},181 keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},182 title = {Efficient Few-Shot Learning Without Prompts},183 publisher = {arXiv},184 year = {2022},185 copyright = {Creative Commons Attribution 4.0 International}186}187```188 189<!--190## Glossary191 192*Clearly define terms in order to be accessible across audiences.*193-->194 195<!--196## Model Card Authors197 198*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*199-->200 201<!--202## Model Card Contact203 204*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*205-->