Instructions to use LinaSaba/BertDisasterTweets with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use LinaSaba/BertDisasterTweets with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("LinaSaba/BertDisasterTweets", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - Notebooks
- Google Colab
- Kaggle
|
Download README.md from LinaSaba/BertDisasterTweets: direct link, hf CLI and curl.
- Browser
- Download file 1.52 kB
-
https://huggingface.co/LinaSaba/BertDisasterTweets/resolve/main/README.md
- Command line
-
hf download hf://LinaSaba/BertDisasterTweets/README.md
-
curl -L -o README.md https://huggingface.co/LinaSaba/BertDisasterTweets/resolve/main/README.md
1.52 kB
| license: afl-3.0 | |
| metrics: | |
| - accuracy | |
| - code_eval | |
| library_name: sklearn | |
| pipeline_tag: text-classification | |
| tags: | |
| - clim | |
| # bert-model-disaster-tweets-classification | |
| This model is a fine-tuned version of [bert-base-uncased](https://huggingface.co/bert-base-uncased) on the Natural-Language-Processing-with-Disaster-Tweets dataset. | |
| It achieves the following results on the evaluation set: | |
| - Accuracy: 0.82 | |
| - F1 Score: 0.82 | |
| ## Model description | |
| Load BertForSequenceClassification, the pretrained BERT model with a single linear classification layer on top, using an optimizer : incorporates weight decay, which is a regularization technique that helps prevent overfitting during training. | |
| ## Intended uses & limitations | |
| Use to classify if a tweet represents a disaster or not. | |
| ### Training hyperparameters | |
| The following hyperparameters were used during training: | |
| - learning_rate: 2e-05 | |
| - train_batch_size: 32 | |
| - eval_batch_size: 32 | |
| - seed: 42 | |
| - optimizer: Adam with epsilon = 1e-8. | |
| - lr_scheduler_type: linear | |
| - num_epochs: 3 | |
| ### Training results | |
| | Epoch | Average training loss | Training epoch | Accuracy | F1 | | |
| |:-----:|:---------------------:|:---------------:|:--------:|:----:| | |
| | 1.0 | 0.47 | 0:00:49 | 0.82 | 0.82 | | |
| | 2.0 | 0.36 | 0:00:36 | 0.82 | 0.82 | | |
| | 3.0 | 0.29 | 0:00:51 | 0.82 | 0.82 | | |
| ### Framework versions | |
| - Transformers 4.28.1 | |
| - Pytorch 2.0.0+cu118 | |
| - Datasets 2.12.0 | |
| - Tokenizers 0.13.3 | |