Text Classification
Transformers
PyTorch
TensorBoard
English
roberta
Generated from Trainer
text-embeddings-inference
Instructions to use DunnBC22/roberta-base-Tweet_About_Disaster_Or_Not with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DunnBC22/roberta-base-Tweet_About_Disaster_Or_Not with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="DunnBC22/roberta-base-Tweet_About_Disaster_Or_Not")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("DunnBC22/roberta-base-Tweet_About_Disaster_Or_Not") model = AutoModelForSequenceClassification.from_pretrained("DunnBC22/roberta-base-Tweet_About_Disaster_Or_Not") - Notebooks
- Google Colab
- Kaggle
| license: mit | |
| tags: | |
| - generated_from_trainer | |
| metrics: | |
| - accuracy | |
| - f1 | |
| - recall | |
| - precision | |
| model-index: | |
| - name: roberta-base-Tweet_About_Disaster_Or_Not | |
| results: [] | |
| language: | |
| - en | |
| # roberta-base-Tweet_About_Disaster_Or_Not | |
| This model is a fine-tuned version of [roberta-base](https://huggingface.co/roberta-base) on the None dataset. | |
| It achieves the following results on the evaluation set: | |
| - Loss: 0.2640 | |
| - Accuracy: 0.8989 | |
| - F1: 0.7569 | |
| - Recall: 0.8211 | |
| - Precision: 0.7020 | |
| ## Model description | |
| This is a binary classification model to determine if tweet input samples are about a disaster or not. | |
| For more information on how it was created, check out the following link: https://github.com/DunnBC22/NLP_Projects/blob/main/Binary%20Classification/Transformer%20Comparison/Is%20This%20Tweet%20Referring%20to%20a%20Disaster%20or%20Not%3F%20-%20RoBERTa.ipynb | |
| ### Associated Projects | |
| This project is part of a comparison of multiple transformers. The others can be found at the following links: | |
| - https://huggingface.co/DunnBC22/deberta-v3-small-Tweet_About_Disaster_Or_Not | |
| - https://huggingface.co/DunnBC22/albert-base-v2-Tweet_About_Disaster_Or_Not | |
| - https://huggingface.co/DunnBC22/electra-base-emotion-Tweet_About_Disaster_Or_Not | |
| - https://huggingface.co/DunnBC22/ernie-2.0-base-en-Tweet_About_Disaster_Or_Not | |
| - https://huggingface.co/DunnBC22/distilbert-base-uncased-Tweet_About_Disaster_Or_Not | |
| ## Intended uses & limitations | |
| This model is intended to demonstrate my ability to solve a complex problem using technology. | |
| The main limitation is the quality of the data source. | |
| ## Training and evaluation data | |
| Dataset Source: https://www.kaggle.com/datasets/vstepanenko/disaster-tweets | |
| _Input Word Length By Class:_ | |
|  | |
| ## Training procedure | |
| ### Training hyperparameters | |
| The following hyperparameters were used during training: | |
| - learning_rate: 2e-05 | |
| - train_batch_size: 64 | |
| - eval_batch_size: 64 | |
| - seed: 42 | |
| - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 | |
| - lr_scheduler_type: linear | |
| - num_epochs: 5 | |
| ### Training results | |
| | Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | Recall | Precision | | |
| |:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|:------:|:---------:| | |
| | 0.372 | 1.0 | 143 | 0.3067 | 0.8690 | 0.7205 | 0.8807 | 0.6095 | | |
| | 0.2356 | 2.0 | 286 | 0.2640 | 0.8989 | 0.7569 | 0.8211 | 0.7020 | | |
| | 0.165 | 3.0 | 429 | 0.3029 | 0.8997 | 0.7635 | 0.8440 | 0.6970 | | |
| | 0.1118 | 4.0 | 572 | 0.3256 | 0.8971 | 0.7578 | 0.8394 | 0.6906 | | |
| | 0.0766 | 5.0 | 715 | 0.3733 | 0.9024 | 0.7711 | 0.8578 | 0.7004 | | |
| ### Framework versions | |
| - Transformers 4.26.1 | |
| - Pytorch 1.13.1 | |
| - Datasets 2.9.0 | |
| - Tokenizers 0.12.1 | |
| ## License Notice | |
| This model is a fine-tuned derivative of a pretrained model. | |
| Users must comply with the original model license. | |
| ## Dataset Notice | |
| This model was fine-tuned on third-party datasets which may have separate licenses or usage restrictions. |