LLM watermarking, which embeds imperceptible yet algorithmically detectable signals in model outputs to identify LLM-generated text, has become crucial in mitigating the potential misuse of large language models. However, the abundance of LLM watermarking algorithms, their intricate mechanisms, and the complex evaluation procedures and perspectives pose challenges for researchers and the community to easily experiment with, understand, and assess the latest advancements. To address these issues, we introduce MarkLLM, an open-source toolkit for LLM watermarking. MarkLLM offers a unified and extensible framework for implementing LLM watermarking algorithms, while providing user-friendly interfaces to ensure ease of access. Furthermore, it enhances understanding by supporting automatic visualization of the underlying mechanisms of these algorithms. For evaluation, MarkLLM offers a comprehensive suite of 12 tools spanning three perspectives, along with two types of automated evaluation pipelines. Through MarkLLM, we aim to support researchers while improving the comprehension and involvement of the general public in LLM watermarking technology, fostering consensus and driving further advancements in research and application. Our code is available at https://github.com/THU-BPM/MarkLLM.
翻译:大型语言模型(LLM)水印技术通过在模型输出中嵌入难以察觉但可通过算法检测的信号来识别LLM生成的文本,已成为缓解大语言模型潜在滥用的关键手段。然而,现有水印算法种类繁多、机制复杂,且评估流程与视角多元,这为研究者和社区便捷地实验、理解与评估最新进展带来了挑战。为应对这些问题,我们推出了MarkLLM——一个开源的大型语言模型水印工具包。该工具包不仅提供了统一且可扩展的水印算法实现框架,还通过友好的用户接口确保易用性。此外,通过支持算法内部机制的自动可视化,MarkLLM增强了水印技术的可解释性。在评估层面,本工具包提供了涵盖三大维度的12种评估工具及两类自动化评估流水线。我们期望通过MarkLLM助力学术研究,同时提升公众对LLM水印技术的理解与参与度,推动该领域在研究与应用层面达成共识并持续发展。代码已开源:https://github.com/THU-BPM/MarkLLM。