CoolFace
Modelpublic

mann2107/BCMPIIRAB_MiniLM_ALLNew

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes7downloads
README.md275 linesDownload Raw Back to root
1---2base_model: sentence-transformers/all-MiniLM-L6-v23library_name: setfit4metrics:5- accuracy6pipeline_tag: text-classification7tags:8- setfit9- sentence-transformers10- text-classification11- generated_from_setfit_trainer12widget:13- text: Thank you for your email. Please go ahead and issue. Please invoice in KES14- text: Hi, We are missing some invoices, can you please provide it. 02 - 12 - 202015    AGENT FEE 8900784339018 $21.00 02 - 19 - 2020 AGENT FEE 0017417554160 $22.00 0216    - 19 - 2020 AGENT FEE 0017417554143 $22.00 02 - 19 - 2020 AGENT FEE 890078338342017    $21.0018- text: We need your assistance with the payment for the recent office supplies order.19    Let us know once it's done.20- text: I have reported this in November and not only was the trip supposed to be21    cancelled and credited I was double billed and the billing has not been corrected.22    The total credit should be $667.20. Please confirm this will be done.23- text: The invoice for the travel arrangements needs to be settled. Kindly provide24    payment confirmation.25inference: true26---27 28# SetFit with sentence-transformers/all-MiniLM-L6-v229 30This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-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.31 32The model has been trained using an efficient few-shot learning technique that involves:33 341. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.352. Training a classification head with features from the fine-tuned Sentence Transformer.36 37## Model Details38 39### Model Description40- **Model Type:** SetFit41- **Sentence Transformer body:** [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2)42- **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance43- **Maximum Sequence Length:** 256 tokens44- **Number of Classes:** 14 classes45<!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->46<!-- - **Language:** Unknown -->47<!-- - **License:** Unknown -->48 49### Model Sources50 51- **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit)52- **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)53- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)54 55 56## Uses57 58### Direct Use for Inference59 60First install the SetFit library:61 62```bash63pip install setfit64```65 66Then you can load this model and run inference.67 68```python69from setfit import SetFitModel70 71# Download from the ๐Ÿค— Hub72model = SetFitModel.from_pretrained("mann2107/BCMPIIRAB_MiniLM_ALLNew")73# Run inference74preds = model("Thank you for your email. Please go ahead and issue. Please invoice in KES")75```76 77<!--78### Downstream Use79 80*List how someone could finetune this model on their own dataset.*81-->82 83<!--84### Out-of-Scope Use85 86*List how the model may foreseeably be misused and address what users ought not to do with the model.*87-->88 89<!--90## Bias, Risks and Limitations91 92*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*93-->94 95<!--96### Recommendations97 98*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*99-->100 101## Training Details102 103### Training Set Metrics104| Training set | Min | Median  | Max |105|:-------------|:----|:--------|:----|106| Word count   | 1   | 25.6577 | 136 |107 108| Label | Training Sample Count |109|:------|:----------------------|110| 0     | 24                    |111| 1     | 24                    |112| 2     | 24                    |113| 3     | 24                    |114| 4     | 24                    |115| 5     | 24                    |116| 6     | 24                    |117| 7     | 24                    |118| 8     | 24                    |119| 9     | 24                    |120| 10    | 24                    |121| 11    | 24                    |122| 12    | 24                    |123| 13    | 24                    |124 125### Training Hyperparameters126- batch_size: (16, 16)127- num_epochs: (1, 1)128- max_steps: -1129- sampling_strategy: oversampling130- num_iterations: 99131- body_learning_rate: (0.0002733656643765287, 0.0002733656643765287)132- head_learning_rate: 2.7029049129688732e-05133- loss: CosineSimilarityLoss134- distance_metric: cosine_distance135- margin: 0.25136- end_to_end: False137- use_amp: False138- warmup_proportion: 0.1139- max_length: 512140- seed: 42141- eval_max_steps: -1142- load_best_model_at_end: True143 144### Training Results145| Epoch   | Step     | Training Loss | Validation Loss |146|:-------:|:--------:|:-------------:|:---------------:|147| 0.0002  | 1        | 0.2546        | -               |148| 0.0120  | 50       | 0.1667        | -               |149| 0.0241  | 100      | 0.1165        | -               |150| 0.0361  | 150      | 0.0799        | -               |151| 0.0481  | 200      | 0.0212        | -               |152| 0.0601  | 250      | 0.0188        | -               |153| 0.0722  | 300      | 0.0531        | -               |154| 0.0842  | 350      | 0.0273        | -               |155| 0.0962  | 400      | 0.0111        | -               |156| 0.1082  | 450      | 0.0203        | -               |157| 0.1203  | 500      | 0.0397        | -               |158| 0.1323  | 550      | 0.0164        | -               |159| 0.1443  | 600      | 0.0045        | -               |160| 0.1563  | 650      | 0.0032        | -               |161| 0.1684  | 700      | 0.001         | -               |162| 0.1804  | 750      | 0.0011        | -               |163| 0.1924  | 800      | 0.0004        | -               |164| 0.2044  | 850      | 0.0009        | -               |165| 0.2165  | 900      | 0.0006        | -               |166| 0.2285  | 950      | 0.0008        | -               |167| 0.2405  | 1000     | 0.0004        | -               |168| 0.2525  | 1050     | 0.0008        | -               |169| 0.2646  | 1100     | 0.0005        | -               |170| 0.2766  | 1150     | 0.0006        | -               |171| 0.2886  | 1200     | 0.0007        | -               |172| 0.3006  | 1250     | 0.0043        | -               |173| 0.3127  | 1300     | 0.0004        | -               |174| 0.3247  | 1350     | 0.0005        | -               |175| 0.3367  | 1400     | 0.0005        | -               |176| 0.3487  | 1450     | 0.0004        | -               |177| 0.3608  | 1500     | 0.0004        | -               |178| 0.3728  | 1550     | 0.0005        | -               |179| 0.3848  | 1600     | 0.0007        | -               |180| 0.3968  | 1650     | 0.0006        | -               |181| 0.4089  | 1700     | 0.0002        | -               |182| 0.4209  | 1750     | 0.0006        | -               |183| 0.4329  | 1800     | 0.0008        | -               |184| 0.4449  | 1850     | 0.0003        | -               |185| 0.4570  | 1900     | 0.0005        | -               |186| 0.4690  | 1950     | 0.0003        | -               |187| 0.4810  | 2000     | 0.0003        | -               |188| 0.4930  | 2050     | 0.0003        | -               |189| 0.5051  | 2100     | 0.0006        | -               |190| 0.5171  | 2150     | 0.0003        | -               |191| 0.5291  | 2200     | 0.0002        | -               |192| 0.5411  | 2250     | 0.0002        | -               |193| 0.5532  | 2300     | 0.0002        | -               |194| 0.5652  | 2350     | 0.0004        | -               |195| 0.5772  | 2400     | 0.0003        | -               |196| 0.5892  | 2450     | 0.0003        | -               |197| 0.6013  | 2500     | 0.0002        | -               |198| 0.6133  | 2550     | 0.0002        | -               |199| 0.6253  | 2600     | 0.0013        | -               |200| 0.6373  | 2650     | 0.0002        | -               |201| 0.6494  | 2700     | 0.0007        | -               |202| 0.6614  | 2750     | 0.0004        | -               |203| 0.6734  | 2800     | 0.0007        | -               |204| 0.6854  | 2850     | 0.0018        | -               |205| 0.6975  | 2900     | 0.0002        | -               |206| 0.7095  | 2950     | 0.0003        | -               |207| 0.7215  | 3000     | 0.0006        | -               |208| 0.7335  | 3050     | 0.0003        | -               |209| 0.7456  | 3100     | 0.0002        | -               |210| 0.7576  | 3150     | 0.0002        | -               |211| 0.7696  | 3200     | 0.0002        | -               |212| 0.7816  | 3250     | 0.0002        | -               |213| 0.7937  | 3300     | 0.0002        | -               |214| 0.8057  | 3350     | 0.0001        | -               |215| 0.8177  | 3400     | 0.0003        | -               |216| 0.8297  | 3450     | 0.0002        | -               |217| 0.8418  | 3500     | 0.0002        | -               |218| 0.8538  | 3550     | 0.0002        | -               |219| 0.8658  | 3600     | 0.0002        | -               |220| 0.8778  | 3650     | 0.0002        | -               |221| 0.8899  | 3700     | 0.0002        | -               |222| 0.9019  | 3750     | 0.0005        | -               |223| 0.9139  | 3800     | 0.0002        | -               |224| 0.9259  | 3850     | 0.0001        | -               |225| 0.9380  | 3900     | 0.0004        | -               |226| 0.9500  | 3950     | 0.0001        | -               |227| 0.9620  | 4000     | 0.0005        | -               |228| 0.9740  | 4050     | 0.0002        | -               |229| 0.9861  | 4100     | 0.0002        | -               |230| 0.9981  | 4150     | 0.0001        | -               |231| **1.0** | **4158** | **-**         | **0.0302**      |232 233* The bold row denotes the saved checkpoint.234### Framework Versions235- Python: 3.10.12236- SetFit: 1.1.0.dev0237- Sentence Transformers: 3.0.1238- Transformers: 4.42.4239- PyTorch: 2.3.1+cu121240- Datasets: 2.20.0241- Tokenizers: 0.19.1242 243## Citation244 245### BibTeX246```bibtex247@article{https://doi.org/10.48550/arxiv.2209.11055,248    doi = {10.48550/ARXIV.2209.11055},249    url = {https://arxiv.org/abs/2209.11055},250    author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},251    keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},252    title = {Efficient Few-Shot Learning Without Prompts},253    publisher = {arXiv},254    year = {2022},255    copyright = {Creative Commons Attribution 4.0 International}256}257```258 259<!--260## Glossary261 262*Clearly define terms in order to be accessible across audiences.*263-->264 265<!--266## Model Card Authors267 268*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*269-->270 271<!--272## Model Card Contact273 274*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*275-->