cs.LGSep 18, 2026

FairLMs: A Turnkey Library for Fairness in Language Models

Authors: Jiale Zhang, Michael Larionov, Zichong Wang, Zhipeng Yin, Wenbin Zhang

Organizations: Department of Biostatistics and Health Data Science Indiana University Indianapolis, IN, United States · Department of Statistics and Data Science Carnegie Mellon University Pittsburgh, PA, United States · Knight Foundation School of Computing and Information Sciences Florida International University Miami, FL, United States

Abstract

Fairness research on language models involves measuring bias, applying mitigation methods, and examining the evidence on which an evaluation rests. Existing tools offer complementary functionality through different interfaces, so combining them requires reconciling model interfaces, evidence formats, access constraints, and result types before applicability can be checked or methods compared. We introduce FairLMs, a Python library that connects these activities through explicit declarations of model capabilities and input requirements. It provides 33 intrinsic and extrinsic metrics, 14 mitigation components spanning four intervention categories, 14 dataset and scoring-instrument diagnostics, adapters for the three Transformer architectures and supported hosted completion APIs, and benchmark loaders. Declarations are checked before execution and results carry the configuration under which they were obtained, so that compatible components can be combined, methods compared under a common protocol, and workflows extended to new models and datasets. The source code is available at: https://github.com/FairLMs/FairLMs.

Figures & tables

Explore similar work

CardsList
  1. Fair in Mind, Fair in Action? A Synchronous Benchmark for Understanding and Generation in UMLLMs

    Feb 28, 2026Yiran Zhao, Lu Zhou, Xiaogang Xu +3Algorithmic FairnessDemographic Bias in Language Models

  2. Audit Me If You Can: Query-Efficient Active Fairness Auditing of Black-Box LLMs

    Jan 6, 2026David Hartmann, Lena Pohlmann, Lelia Hanslik +3LLM AuditingAlgorithmic Fairness