Instructions to use MichiganNLP/hacking-fairness-benchmarks-qwen2.5-7b-z999 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use MichiganNLP/hacking-fairness-benchmarks-qwen2.5-7b-z999 with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
model card
Browse files
README.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: Qwen/Qwen2.5-7B
|
| 3 |
+
library_name: peft
|
| 4 |
+
license: mit
|
| 5 |
+
tags:
|
| 6 |
+
- lora
|
| 7 |
+
- grpo
|
| 8 |
+
- fairness
|
| 9 |
+
- bbq
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# hacking-fairness-benchmarks-qwen2.5-7b-z999
|
| 13 |
+
|
| 14 |
+
One-shot GRPO LoRA adapter for `Qwen/Qwen2.5-7B`, trained on the **single** BBQ example
|
| 15 |
+
`z999`. From the EMNLP 2026 paper
|
| 16 |
+
**[One Example Is Enough to Pass Fairness Benchmarks: Rethinking Fairness Evaluation for Aligned LLMs](https://lit.eecs.umich.edu/hacking-fairness-benchmarks/)**.
|
| 17 |
+
|
| 18 |
+
Training on this one example moves `Qwen/Qwen2.5-7B` from **79.9** to **91.6** BBQ accuracy.
|
| 19 |
+
|
| 20 |
+
> This is a research artifact demonstrating that BBQ-style fairness benchmarks can be
|
| 21 |
+
> saturated from a single example. **It is not a fairness-aligned model.** The paper shows
|
| 22 |
+
> the gain does not transfer to generative fairness (RealToxicityPrompts). Do not deploy it
|
| 23 |
+
> as a safety measure.
|
| 24 |
+
|
| 25 |
+
## Checkpoints are revisions
|
| 26 |
+
|
| 27 |
+
Every GRPO step is a git revision. `main` is the step the paper reports, so a plain
|
| 28 |
+
load reproduces the published number.
|
| 29 |
+
|
| 30 |
+
| Revision | |
|
| 31 |
+
|---|---|
|
| 32 |
+
| `step10` | |
|
| 33 |
+
| `step20` | |
|
| 34 |
+
| `step30` | **the checkpoint reported in the paper** (= `main`) |
|
| 35 |
+
| `step40` | |
|
| 36 |
+
| `step50` | |
|
| 37 |
+
| `step60` | |
|
| 38 |
+
| `step70` | |
|
| 39 |
+
| `step80` | |
|
| 40 |
+
| `step90` | |
|
| 41 |
+
| `step100` | |
|
| 42 |
+
|
| 43 |
+
```python
|
| 44 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 45 |
+
from peft import PeftModel
|
| 46 |
+
|
| 47 |
+
base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-7B", torch_dtype="bfloat16")
|
| 48 |
+
tok = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-7B")
|
| 49 |
+
|
| 50 |
+
# main == step30, the checkpoint reported in the paper
|
| 51 |
+
model = PeftModel.from_pretrained(base, "MichiganNLP/hacking-fairness-benchmarks-qwen2.5-7b-z999")
|
| 52 |
+
|
| 53 |
+
# or pick any other step
|
| 54 |
+
model = PeftModel.from_pretrained(base, "MichiganNLP/hacking-fairness-benchmarks-qwen2.5-7b-z999", revision="step100")
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
+
The model is prompted to answer in `<think>...</think><answer>A</answer>` format.
|
| 58 |
+
|
| 59 |
+
LoRA config: rank 32, alpha 32, on `q,k,v,o,gate,up,down_proj`.
|
| 60 |
+
Trained against base revision `d149729398750b98c0af14eb82c78cfe92750796`.
|
| 61 |
+
|
| 62 |
+
## Citation
|
| 63 |
+
|
| 64 |
+
```bibtex
|
| 65 |
+
@inproceedings{deng2026one,
|
| 66 |
+
title = {One Example Is Enough to Pass Fairness Benchmarks:
|
| 67 |
+
Rethinking Fairness Evaluation for Aligned {LLM}s},
|
| 68 |
+
author = {Deng, Naihao and Arif, Samee and Chang, Shuaichen and
|
| 69 |
+
Chen, Yulong and Mihalcea, Rada},
|
| 70 |
+
booktitle = {Proceedings of the 2026 Conference on Empirical Methods in
|
| 71 |
+
Natural Language Processing},
|
| 72 |
+
year = {2026}
|
| 73 |
+
}
|
| 74 |
+
```
|