Language Model

Potential harms of large language models can be mitigated by watermarking a model's output. Watermarks are embedded signals in the generated text that are invisible to humans but algorithmically detectable, that allow anyone to later check whether a given span of text was likely to have been generated by a model that uses the watermark.

This space showcases a watermarking approach that can be applied to any generative language model. For demonstration purposes, the space demos a relatively small open-source language model. Such a model is less powerful than proprietary commercial tools like ChatGPT, Claude, or Gemini. Generally, prompts that entail a short, low entropy response such as the few word answer to a factual trivia question, will not exhibit a strong watermark presence, while longer watermarked outputs will produce higher detection statistics.

[Generate & Detect]: The first tab shows that the watermark can be embedded with negligible impact on text quality. You can try any prompt and compare the quality of normal text (Output Without Watermark) to the watermarked text (Output With Watermark) below it. You can also "see" the watermark by looking at the Highlighted tab where the tokens are colored green or red depending on which list they are in. Metrics on the right show that the watermark can be reliably detected given a reasonably small number of tokens (25-50). Detection is very efficient and does not use the language model or its parameters.

[Detector Only]: You can also copy-paste the watermarked text (or any other text) into the second tab. This can be used to see how many sentences you could remove and still detect the watermark.
You can also verify here that the detection has, by design, a low false-positive rate; This means that human-generated text that you copy into this detector will not be marked as machine-generated.

You can find more details about how this watermark functions in our paper "A Watermark for Large Language Models", presented at ICML 2023. Additionally, read about our study on the reliabilty of this watermarking style in "On the Reliability of Watermarks for Large Language Models", presented at ICLR 2024.