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——一个面向LLM水印技术的开源工具包。MarkLLM提供统一且可扩展的框架用于实现LLM水印算法,并通过用户友好型接口确保使用便捷性;此外,其通过支持算法底层机制的可视化自动生成,增强对算法的理解。在评估方面,MarkLLM提供涵盖三个维度的12种综合工具,以及两类自动化评估流程。借助MarkLLM,我们旨在支持研究人员的同时,提升公众对LLM水印技术的理解与参与度,凝聚共识,推动研究与应用领域的进一步发展。我们的代码开源地址为:https://github.com/THU-BPM/MarkLLM。