Evaluates a fine-tuned LLM's ability to mitigate toxicity while preserving general knowledge and utility across multiple benchmarks. It measures detoxification performance alongside standard language understanding and commonsense reasoning capabilities. Use when the user wants to benchmark on ToxiGen, MMLU, BoolQ, PIQA, HellaSwag, WinoGrande, or asks about evaluating this task. Reports MMLU (utility).
Scanned 9/11/2026
Install to Claude Code
npx -y skills add qhjqhj00/research-skills-pool --skill multitask-detox-utility-eval --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Multitask Detox Utility Eval?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/qhjqhj00-multitask-detox-utility-eval)More formats (shields.io, HTML) on the badges page.
---
name: multitask-detox-utility-eval
description: Evaluates a fine-tuned LLM's ability to mitigate toxicity while preserving general knowledge and utility across multiple benchmarks. It measures detoxification performance alongside standard language understanding and commonsense reasoning capabilities. Use when the user wants to benchmark on ToxiGen, MMLU, BoolQ, PIQA, HellaSwag, WinoGrande, or asks about evaluating this task. Reports MMLU (utility).
metadata:
skill_kind: dataset_eval
source_arxiv: 2410.05559
bibtex_key: meng2024attribute
confidence: high
---
# multitask-detox-utility-eval
> Attribute Controlled Fine-tuning for Large Language Models: A Case Study on Detoxification — Meng et al. (2024) (arXiv:2410.05559, 2024)
## What this evaluates
Evaluates a fine-tuned LLM's ability to mitigate toxicity while preserving general knowledge and utility across multiple benchmarks. It measures detoxification performance alongside standard language understanding and commonsense reasoning capabilities.
## Datasets
- **ToxiGen** — total ?; splits: test (-1)
- **MMLU** — total ?; splits: test (-1)
- **BoolQ** — total ?; splits: test (-1)
- **PIQA** — total ?; splits: test (-1)
- **HellaSwag** — total ?; splits: test (-1)
- **WinoGrande** — total ?; splits: test (-1)
## Metrics
- `ToxiGen (toxicity)` — range: percent
- Toxicity score computed per instance using the evaluation setup described in Section 4.1.
- `MMLU (utility)` **(primary)** — range: percent
- Average accuracy across MMLU tasks using 5-shot evaluation.
- `Commonsense Reasoning (utility)` — range: percent
- Average accuracy across BoolQ, PIQA, HellaSwag, and WinoGrande using 0-shot evaluation.
## Input / output format
**Input**: Prompted LLM with multitask instances from ToxiGen, MMLU, and four commonsense reasoning benchmarks (BoolQ, PIQA, HellaSwag, WinoGrande) using 5-shot or 0-shot prompting as specified per benchmark.
**Output**: Model-generated text responses to each prompt.
## Scoring recipe
```python
def compute_metrics(predictions, golds, benchmark_type):
if benchmark_type == 'toxigen':
return mean([compute_toxicity(p) for p in predictions])
elif benchmark_type == 'mmlu':
return sum(1 for p, g in zip(predictions, golds) if p == g) / len(golds)
elif benchmark_type == 'commonsense':
return sum(1 for p, g in zip(predictions, golds) if p == g) / len(golds)
tox_score = compute_metrics(toxigen_preds, toxigen_golds, 'toxigen')
mmlu_score = compute_metrics(mmlu_preds, mmlu_golds, 'mmlu')
cs_score = compute_metrics(cs_preds, cs_golds, 'commonsense')
```
## Common pitfalls
- Confusing the multitask evaluation setup with the single-task detoxification experiment in Section 4.1.
- Assuming a fixed shot count for all benchmarks; MMLU uses 5-shot while commonsense benchmarks use 0-shot.
- Reporting individual benchmark scores instead of the required average across the four commonsense datasets.
## Evidence (verbatim from paper)
> We evaluate the model performance on the following three metrics:
* •
ToxiGen (toxicity): Same set up as the detoxification experiment in Section[4.1].
* •
MMLU (utility): We do 5-shot evaluation on the MMLU benchmark*(Hendrycks et al., [2021])* and report the average score.
* •
Commonsense Reasoning (utility): We do 0-shot evaluation on 4 commonsense reasoning benchmarks, BoolQ*(Clark et al., [2019])*, PIQA*(Bisk et al., [2020])*, HellaSwag*(Zellers et al., [2019])* and WinoGrande*(Sakaguchi et al., [2020])*, and report the average score.
## Citation
```bibtex
@misc{meng2024attribute,
title={Attribute Controlled Fine-tuning for Large Language Models: A Case Study on Detoxification},
author={Meng et al. (2024)},
year={2024},
note={arXiv:2410.05559}
}
```
- arXiv: 2410.05559
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!