用合成数据统一净化大模型毒性,无需调参
UniDetox: Universal Detoxification of Large Language Models via Dataset Distillation
- 通过对比解码提炼净化文本,生成通用合成数据
- 一份合成数据可净化GPT-2至LLaMA-2等多模型
- 无需为每模型调参,且降低政治偏见
我们提出UniDetox,一种可通用应用于多种大语言模型(LLMs)的去毒方法。以往去毒方法通常仅针对特定模型或模型族,需繁琐超参数调优以平衡去毒效果与语言建模性能。相比之下,UniDetox采用新颖高效的去毒数据蒸馏技术,利用对比解码提炼出合成文本形式的净化表示,使任意模型通过微调该合成数据即可实现通用去毒。实验表明,从GPT-2中蒸馏出的净化文本能有效去毒更大模型,包括OPT、Falcon和LLaMA-2。此外,单一超参数配置即可无缝适配不同模型,无需单独调参。分析显示,净化文本中政治偏见内容减少,揭示了有效去毒所需的关键属性。
原文摘要 · Abstract (English)
We present UniDetox, a universally applicable method designed to mitigate toxicity across various large language models (LLMs). Previous detoxification methods are typically model-specific, addressing only individual models or model families, and require careful hyperparameter tuning due to the trade-off between detoxification efficacy and language modeling performance. In contrast, UniDetox provides a detoxification technique that can be universally applied to a wide range of LLMs without the need for separate model-specific tuning. Specifically, we propose a novel and efficient dataset distillation technique for detoxification using contrastive decoding. This approach distills detoxifying representations in the form of synthetic text data, enabling universal detoxification of any LLM through fine-tuning with the distilled text. Our experiments demonstrate that the detoxifying text distilled from GPT-2 can effectively detoxify larger models, including OPT, Falcon, and LLaMA-2. Furthermore, UniDetox eliminates the need for separate hyperparameter tuning for each model, as a single hyperparameter configuration can be seamlessly applied across different models. Additionally, analysis of the detoxifying text reveals a reduction in politically biased content, providing insights into the attributes necessary for effective detoxification of LLMs.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。