Run this model with HF Jobs
Run PriyaPatel/bias_identificaiton45 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/PriyaPatel/bias_identificaiton45. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/PriyaPatel/bias_identificaiton45 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use PriyaPatel/bias_identificaiton45 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use PriyaPatel/bias_identificaiton45 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="PriyaPatel/bias_identificaiton45")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("PriyaPatel/bias_identificaiton45") model = AutoModelForSequenceClassification.from_pretrained("PriyaPatel/bias_identificaiton45", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Model description
This model is a fine-tuned version of the cardiffnlp/twitter-roberta-base-sentiment-latest on a custom dataset for bias identification in large language models. It is trained to classify input text into one of 10 bias categories.
Intended uses & limitations
Intended Uses:
- Bias Detection: Identifying and categorizing bias types in sentences or text fragments.
- Research: Analyzing and understanding biases in natural language processing models.
Limitations:
- Domain Specificity: The model's performance is optimized for detecting biases within the domains represented in the training data.
- Not for General Sentiment Analysis: This model is not designed for general sentiment analysis or other NLP tasks.
Dataset Used for Training
This dataset was compiled to analyze various types of stereotypical biases present in language models. It incorporates data from multiple publicly available datasets, each contributing to the identification of specific bias types.
Link of the dataset: PriyaPatel/Bias_identification
The biases are labeled as follows:
- Race/Color -
0 - Socioeconomic Status -
1 - Gender -
2 - Disability -
3 - Nationality -
4 - Sexual Orientation -
5 - Physical Appearance -
6 - Religion -
7 - Age -
8 - Profession -
9
Training procedure
- Base Model:
cardiffnlp/twitter-roberta-base-sentiment-latest - Optimizer: Adam with a learning rate of 0.00001
- Loss Function: Sparse Categorical Crossentropy
- Batch Size: 20
- Epochs: 3
Training hyperparameters
- Learning Rate: 0.00001
- Optimizer: Adam
- Loss Function: Sparse Categorical Crossentropy
- Batch Size: 20
- Epochs: 3
Training Results
- Validation Loss: 0.0744
- Validation Accuracy: 0.9825
- Test Loss: 0.0715
- Test Accuracy: 0.9832
How to Load the Model
You can load the model using the Hugging Face transformers library as follows:
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("PriyaPatel/bias_identificaiton45")
model = AutoModelForSequenceClassification.from_pretrained("PriyaPatel/bias_identificaiton45")
# Example usage
inputs = tokenizer("Your text here", return_tensors="tf")
outputs = model(**inputs)
- Downloads last month
- 12