--- library_name: transformers license: mit base_model: roberta-base tags: - generated_from_trainer metrics: - accuracy model-index: - name: toxicity-classification-model results: [] datasets: - dirtycomputer/Toxic_Comment_Classification_Challenge language: - en pipeline_tag: text-classification --- # toxicity-classification-model This model is a fine-tuned version of [roberta-base](https://huggingface.co/roberta-base) on the dirtycomputer/Toxic_Comment_Classification_Challenge dataset. It achieves the following results on the evaluation set: - Loss: 0.0511 - Accuracy: 0.9812 ## Model description Fine-tuned roberta-base model for detecting toxicity in comments. It categorizes a comment into different toxicity types, such as "toxic," "obscene," "insult," and "threat." ## Intended uses & limitations ### Intended Uses - **Content Moderation**: Automatically flagging or removing toxic comments on social media platforms, forums, and customer support. - **Toxicity Detection**: Classifying comments based on their toxicity level, such as harmful language or insults. ### Limitations - **False Negatives**: May not always catch subtle toxic behavior. - **Limited Language Support**: Currently, the model is trained on English-only data. - **Context Sensitivity**: May struggle with ambiguous language or sarcasm. ## Training and evaluation data This model was fine-tuned using the **dirtycomputer/Toxic_Comment_Classification_Challenge** dataset, which contains labeled comments for toxicity classification. ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 5e-05 - train_batch_size: 8 - eval_batch_size: 16 - seed: 42 - optimizer: Use adamw_torch with betas=(0.9, 0.999) and epsilon=1e-08 - lr_scheduler_type: linear - lr_scheduler_warmup_steps: 500 - num_epochs: 3 ### Training results | Training Loss | Epoch | Step | Validation Loss | Accuracy | |:-------------:|:-----:|:-----:|:---------------:|:--------:| | 0.1691 | 1.0 | 17952 | 0.1464 | 0.9617 | | 0.0892 | 2.0 | 35904 | 0.1456 | 0.9617 | | 0.0527 | 3.0 | 53856 | 0.0511 | 0.9812 | ### Framework versions - Transformers 4.47.1 - Pytorch 2.5.1+cu121 - Datasets 3.2.0 - Tokenizers 0.21.0