Team Ai
Modelpublic

Softechlb/Sent_analysis_CVs

sourceHugging Faceapache-2.0updated 3y agoView on Hugging Face
0likes17downloads
README.md107 linesDownload Raw Back to root
1---2license: apache-2.03tags:4- sentiment-analysis5- text-classification6- zero-shot-distillation7- distillation8- zero-shot-classification9- debarta-v310model-index:11- name: Softechlb/Sent_analysis_CVs12  results: []13datasets:14- tyqiangz/multilingual-sentiments15language:16- en17- ar18- de19- es20- fr21- ja22- zh23- id24- hi25- it26- ms27- pt28---29 30<!-- This model card has been generated automatically according to the information the Trainer had access to. You31should probably proofread and complete it, then remove this comment. -->32 33# Softechlb/Sent_analysis_CVs34 35This model is distilled from the zero-shot classification pipeline on the Multilingual Sentiment 36dataset using this [script](https://github.com/huggingface/transformers/tree/main/examples/research_projects/zero-shot-distillation). 37 38In reality the multilingual-sentiment dataset is annotated of course, 39but we'll pretend and ignore the annotations for the sake of example.40 41 42    Teacher model: MoritzLaurer/mDeBERTa-v3-base-mnli-xnli43    Teacher hypothesis template: "The sentiment of this text is {}."44    Student model: distilbert-base-multilingual-cased45 46 47## Inference example48 49```python50from transformers import pipeline51 52distilled_student_sentiment_classifier = pipeline(53    model="Softechlb/Sent_analysis_CVs", 54    return_all_scores=True55)56 57# english58distilled_student_sentiment_classifier ("I love this movie and i would watch it again and again!")59>> [[{'label': 'positive', 'score': 0.9731044769287109},60  {'label': 'neutral', 'score': 0.016910076141357422},61  {'label': 'negative', 'score': 0.009985478594899178}]]62 63# malay64distilled_student_sentiment_classifier("Saya suka filem ini dan saya akan menontonnya lagi dan lagi!")65[[{'label': 'positive', 'score': 0.9760093688964844},66  {'label': 'neutral', 'score': 0.01804516464471817},67  {'label': 'negative', 'score': 0.005945465061813593}]]68 69# japanese70distilled_student_sentiment_classifier("私はこの映画が大好きで、何度も見ます!")71>> [[{'label': 'positive', 'score': 0.9342429041862488},72  {'label': 'neutral', 'score': 0.040193185210227966},73  {'label': 'negative', 'score': 0.025563929229974747}]]74 75 76```77 78  79```80 81### Training log82```bash83 84Training completed. Do not forget to share your model on huggingface.co/models =)85 86{'train_runtime': 2009.8864, 'train_samples_per_second': 73.0, 'train_steps_per_second': 4.563, 'train_loss': 0.6473459283913797, 'epoch': 1.0}87100%|███████████████████████████████████████| 9171/9171 [33:29<00:00,  4.56it/s]88[INFO|trainer.py:762] 2023-05-06 10:56:18,555 >> The following columns in the evaluation set don't have a corresponding argument in `DistilBertForSequenceClassification.forward` and have been ignored: text. If text are not expected by `DistilBertForSequenceClassification.forward`,  you can safely ignore this message.89[INFO|trainer.py:3129] 2023-05-06 10:56:18,557 >> ***** Running Evaluation *****90[INFO|trainer.py:3131] 2023-05-06 10:56:18,557 >>   Num examples = 14672191[INFO|trainer.py:3134] 2023-05-06 10:56:18,557 >>   Batch size = 12892100%|███████████████████████████████████████| 1147/1147 [08:59<00:00,  2.13it/s]9305/06/2023 11:05:18 - INFO - __main__ - Agreement of student and teacher predictions: 88.29%94[INFO|trainer.py:2868] 2023-05-06 11:05:18,251 >> Saving model checkpoint to ./distilbert-base-multilingual-cased-sentiments-student95[INFO|configuration_utils.py:457] 2023-05-06 11:05:18,251 >> Configuration saved in ./distilbert-base-multilingual-cased-sentiments-student/config.json96[INFO|modeling_utils.py:1847] 2023-05-06 11:05:18,905 >> Model weights saved in ./distilbert-base-multilingual-cased-sentiments-student/pytorch_model.bin97[INFO|tokenization_utils_base.py:2171] 2023-05-06 11:05:18,905 >> tokenizer config file saved in ./distilbert-base-multilingual-cased-sentiments-student/tokenizer_config.json98[INFO|tokenization_utils_base.py:2178] 2023-05-06 11:05:18,905 >> Special tokens file saved in ./distilbert-base-multilingual-cased-sentiments-student/special_tokens_map.json99 100```101 102### Framework versions103 104- Transformers 4.28.1105- Pytorch 2.0.0+cu118106- Datasets 2.11.0107- Tokenizers 0.13.3