arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2505.06262cs.LGcs.AI
收藏

Dialz:一个用于转向向量的 Python 工具包

Dialz: A Python Toolkit for Steering Vectors

School of Computer Science and Informatics, Cardiff University, United Kingdom(计算机科学与信息学学院,卡迪夫大学,英国);AMPLYFI, United Kingdom(AMPLYFI,英国)

Zara Siddique, Liam D. Turner, Luis Espinosa-Anke

AI总结:

Dialz 是一个 Python 工具包,通过模块化设计支持转向向量的数据集构建、计算、应用与可视化,旨在减少有害输出并提升开源大语言模型的可解释性与安全性。

摘要:

我们介绍了 Dialz,一个用于推进开源大语言模型(LLM)转向向量研究的框架,使用 Python 实现。转向向量允许用户在推理时修改激活,以放大或削弱某个“概念”,例如诚实性或积极性,从而提供比提示或微调更强大的替代方案。Dialz 支持多种任务,包括创建对比对数据集、计算和应用转向向量以及可视化。与现有库不同,Dialz 强调模块化和易用性,既能支持快速原型设计,也能支持深入分析。我们展示了如何使用 Dialz 来减少诸如刻板印象等有害输出,同时提供对不同层中模型行为的洞察。我们发布了 Dialz,附带完整文档、教程以及对流行开源模型的支持,以鼓励在安全且可控的语言生成方面开展进一步研究。Dialz 实现了更快的研究周期,并促进了对模型可解释性的洞察,为更安全、更透明且更可靠的 AI 系统铺平了道路。

英文摘要:

We introduce Dialz, a framework for advancing research on steering vectors for open-source LLMs, implemented in Python. Steering vectors allow users to modify activations at inference time to amplify or weaken a 'concept', e.g. honesty or positivity, providing a more powerful alternative to prompting or fine-tuning. Dialz supports a diverse set of tasks, including creating contrastive pair datasets, computing and applying steering vectors, and visualizations. Unlike existing libraries, Dialz emphasizes modularity and usability, enabling both rapid prototyping and in-depth analysis. We demonstrate how Dialz can be used to reduce harmful outputs such as stereotypes, while also providing insights into model behaviour across different layers. We release Dialz with full documentation, tutorials, and support for popular open-source models to encourage further research in safe and controllable language generation. Dialz enables faster research cycles and facilitates insights into model interpretability, paving the way for safer, more transparent, and more reliable AI systems.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑