PriyaPatel/Bias_identification
Viewer • Updated • 28k • 39 • 2
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") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("PriyaPatel/bias_identificaiton45")
model = AutoModelForSequenceClassification.from_pretrained("PriyaPatel/bias_identificaiton45")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.
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:
0123456789cardiffnlp/twitter-roberta-base-sentiment-latestYou 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)