While large language models (LLMs) have shown remarkable capability to generate convincing text across diverse domains, concerns around its potential risks have highlighted the importance of understanding the rationale behind text generation. We present LLM Attributor, a Python library that provides interactive visualizations for training data attribution of an LLM's text generation. Our library offers a new way to quickly attribute an LLM's text generation to training data points to inspect model behaviors, enhance its trustworthiness, and compare model-generated text with user-provided text. We describe the visual and interactive design of our tool and highlight usage scenarios for LLaMA2 models fine-tuned with two different datasets: online articles about recent disasters and finance-related question-answer pairs. Thanks to LLM Attributor's broad support for computational notebooks, users can easily integrate it into their workflow to interactively visualize attributions of their models. For easier access and extensibility, we open-source LLM Attributor at https://github.com/poloclub/ LLM-Attribution. The video demo is available at https://youtu.be/mIG2MDQKQxM.
翻译:尽管大语言模型(LLM)在跨领域生成令人信服文本方面展现出卓越能力,但其潜在风险引发的担忧凸显了理解文本生成背后原理的重要性。我们提出LLM Attributor,这是一个提供大语言模型文本生成训练数据归因交互式可视化的Python库。该库提供了一种快速将LLM文本生成归因至训练数据点的新方法,用于检查模型行为、增强其可信度,并比较模型生成文本与用户提供文本。我们描述了该工具的视觉与交互设计,并展示了基于两个不同数据集微调的LLaMA2模型的应用场景:关于近期灾难的在线文章与金融领域的问答对。得益于LLM Attributor对计算笔记本的广泛支持,用户可轻松将其集成至工作流中,交互式可视化其模型的归因结果。为便于访问与扩展,我们在https://github.com/poloclub/LLM-Attribution 开源了LLM Attributor。视频演示可访问https://youtu.be/mIG2MDQKQxM。