Text Classification
Transformers
Safetensors
English
bert
Social Bias

Run this model with HF Jobs

Run maximuspowers/bias-type-classifier 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/maximuspowers/bias-type-classifier. 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/maximuspowers/bias-type-classifier 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.
How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-classification", model="maximuspowers/bias-type-classifier")
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("maximuspowers/bias-type-classifier")
model = AutoModelForSequenceClassification.from_pretrained("maximuspowers/bias-type-classifier", device_map="auto")
Quick Links

How to Use

classifier = pipeline("text-classification", model="maximuspowers/bias-type-classifier") // pass in return_all_scores=True for multi-label
result = classifier("Tall people are so clumsy")

// Example Result
// [
//    {
//     "label": "physical",
//     "score": 0.9972801208496094
//    }
// ]

This model was trained on a synthetic dataset of biased statements and questions, generated by Mistal 7B as part of the GUS-Net paper.

Model Performance:

Label F1 Score Precision Recall
Macro Average 0.8998 0.9213 0.8807
racial 0.8613 0.9262 0.8049
religious 0.9655 0.9716 0.9595
gender 0.9160 0.9099 0.9223
age 0.9185 0.9683 0.8737
nationality 0.9083 0.9053 0.9113
sexuality 0.9304 0.9484 0.9131
socioeconomic 0.8273 0.8727 0.7864
educational 0.8791 0.9091 0.8511
disability 0.8713 0.8762 0.8665
political 0.9127 0.8914 0.9351
physical 0.9069 0.9547 0.8635

Training Params:

Learning Rate: 5e-5 Batch Size: 16 Epochs: 3

Downloads last month
41
Safetensors
Model size
0.1B params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for maximuspowers/bias-type-classifier

Finetuned
(7,291)
this model

Dataset used to train maximuspowers/bias-type-classifier

Space using maximuspowers/bias-type-classifier 1

Paper for maximuspowers/bias-type-classifier