What is unbias-plus?¶
unbias-plus is an AI-driven toolkit for bias detection and debiasing in text. It identifies biased segments, classifies severity, suggests neutral replacements with reasoning, and produces a full neutral rewrite—supporting risk identification, mitigation, and more trustworthy text systems.
Highlights¶
- Bias detection — Pinpoints biased phrases in text and returns them as structured segments with character-level offsets for highlighting.
- Classification — Overall binary label (biased/unbiased), per-segment severity (low/medium/high), and bias type (e.g. loaded language, framing).
- Reasoning — Each segment includes an explanation of why it is considered biased, so you can review and act with context.
- Debiasing — Per-segment neutral replacements plus a full rewritten
unbiased_textof the input. - Structured output — Pydantic-validated
BiasResult:binary_label,severity(1–5),biased_segments, andunbiased_text. Use via CLI (unbias-plus --text "..."), REST API (FastAPI + demo UI), or Python API (UnBiasPlus().analyze()). - Production-ready — Optional 4-bit quantization and default fine-tuned model vector-institute/Unbias-plus-Qwen2.5.
Video tutorials¶
Videos show how to use the demo UI when you run the API with unbias-plus --serve:
Quick start¶
uv sync
source .venv/bin/activate # or .venv\Scripts\activate on Windows
unbias-plus --text "Women are too emotional to lead."
Or in Python:
from unbias_plus import UnBiasPlus
pipe = UnBiasPlus() # uses default model, or pass model_name_or_path=
result = pipe.analyze("Women are too emotional to lead.")
print(result.binary_label, result.unbiased_text)
Contents¶
- User Guide — Installation, CLI, REST API, Python API, and development.
- API Reference — Module and class reference for
unbias_plus. - Team — Contributors, acknowledgement, and support.
- License — Apache License 2.0.