Downloads · 30 days
11
0% of all-time downloads
D1V1DE/bias-detection
bias-detection is a text classification model from D1V1DE. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
This model is designed to detect bias in text data. It analyzes text inputs to identify and classify types of biases, aiding in the development of more inclusive and fair AI systems. The model is fine-tuned from valur…
Downloads · 30 days
11
0% of all-time downloads
All-time downloads
3K
Public
Repo size
1.3 GB
Likes
1
Public
Click a slice to open those files.
.bin329 MB · 99%
From the Hugging Face model README
This model is designed to detect bias in text data. It analyzes text inputs to identify and classify types of biases, aiding in the development of more inclusive and fair AI systems. The model is fine-tuned from valurank/distilroberta-bias model for research purpose. The model is able to detect bias in formal language since the training corpus is news titles.
The data used for fine-tuning is MBIC dataset, which contains texts with bias labels.
The model is capable of classifying any text into Biased or Non_biased. Max length set for the tokenizer is 512.
Use the code below to get started with the model.
Link to the github demo page to be included
[More Information Needed]
Size of the Dataset: 1700 entries
Preprocessing Steps: Tokenization using a pre-specified tokenizer, padding, and truncation to convert text to numerical features. Classes are encoded numerically.
Data Splitting Strategy: 80% training, 20% validation split, with a random state for reproducibility.
Optimization Algorithm: AdamW
Loss Function: CrossEntropyLoss, weighted by class frequencies to address class imbalance.
Learning Rate: 1e-5
Number of Epochs: 3
Batch Size: 16
Regularization Techniques: Gradient clipping is applied with a max norm of 1.0.
Model-Specific Hyperparameters: Scheduler with step size of 3 and gamma of 0.1 for learning rate decay.
Training time: around 150 iterations/s under CUDA pytorch, less than 10 minutes for training.
Monitoring Strategies: Training and validation losses and validation accuracy are monitored.
Details on the Validation Dataset: Generated from the same DataFrame df using a train-test split.
Techniques Used for Fine-tuning: Learning rate scheduler for adjusting the learning rate.
Challenges Faced During Training: Class imbalance is addressed through weighted CrossEntropyLoss.
Solutions and Techniques Applied: Calculation of class weights from the training data and applying gradient clipping.
[More Information Needed]
[More Information Needed]