jwkirchenbauer commited on
Commit
8ec4512
β€’
1 Parent(s): 5b3e92c

update framework acknowledgement

Browse files
Files changed (1) hide show
  1. demo_watermark.py +17 -7
demo_watermark.py CHANGED
@@ -411,6 +411,8 @@ def run_gradio(args, model=None, device=None, tokenizer=None):
411
  gr.Markdown(
412
  """
413
  ## πŸ’§ [A Watermark for Large Language Models](https://arxiv.org/abs/2301.10226) πŸ”
 
 
414
  """
415
  )
416
  with gr.Column(scale=1):
@@ -445,18 +447,27 @@ def run_gradio(args, model=None, device=None, tokenizer=None):
445
  was likely to have been generated by a model that uses the watermark.
446
 
447
  This space showcases a watermarking approach that can be applied to _any_ generative language model.
448
- For demonstration purposes, the space serves a "small" multi-billion parameter model (see the following note for caveats due to small size).
449
  """
450
  )
451
- with gr.Accordion("A note on model generation quality",open=False):
452
  gr.Markdown(
453
  """
454
- This demo uses open-source language models that fit on a single GPU. These models are less powerful than proprietary commercial tools like ChatGPT, Claude, or Bard.
455
-
456
- Importantly, we use a language model that is designed to "complete" your prompt, and not a model this is fine-tuned to follow instructions.
457
- For best results, prompt the model with a few sentences that form the beginning of a paragraph, and then allow it to "continue" your paragraph.
458
  Some examples include the opening paragraph of a wikipedia article, or the first few sentences of a story.
459
  Longer prompts that end mid-sentence will result in more fluent generations.
 
 
 
 
 
 
 
 
 
460
  """
461
  )
462
  gr.Markdown(
@@ -769,7 +780,6 @@ def run_gradio(args, model=None, device=None, tokenizer=None):
769
  select_green_tokens.change(fn=detect_partial, inputs=[output_with_watermark,session_args,session_tokenizer], outputs=[with_watermark_detection_result,session_args,session_tokenizer])
770
  select_green_tokens.change(fn=detect_partial, inputs=[detection_input,session_args,session_tokenizer], outputs=[detection_result,session_args,session_tokenizer])
771
 
772
-
773
  demo.queue(concurrency_count=3)
774
 
775
  if args.demo_public:
 
411
  gr.Markdown(
412
  """
413
  ## πŸ’§ [A Watermark for Large Language Models](https://arxiv.org/abs/2301.10226) πŸ”
414
+
415
+ Demo made possible by the HuggingFace πŸ€— [text-generation-inference](https://github.com/huggingface/text-generation-inference) serving framework.
416
  """
417
  )
418
  with gr.Column(scale=1):
 
447
  was likely to have been generated by a model that uses the watermark.
448
 
449
  This space showcases a watermarking approach that can be applied to _any_ generative language model.
450
+ For demonstration purposes, the space demos a selection of multi-billion parameter models (see the following note for caveats).
451
  """
452
  )
453
+ with gr.Accordion("A note on the available models:",open=False):
454
  gr.Markdown(
455
  """
456
+ This demo uses open-source language models. Today, these models are less powerful than proprietary commercial tools like ChatGPT, Claude, Bard, or Bing/Sydney.
457
+
458
+ Smaller models like OPT-6.7b are designed to "complete" your prompt, and are not fine-tuned to follow instructions.
459
+ For best results, prompt that model with a few sentences that form the beginning of a paragraph, and then allow it to "continue" your paragraph.
460
  Some examples include the opening paragraph of a wikipedia article, or the first few sentences of a story.
461
  Longer prompts that end mid-sentence will result in more fluent generations.
462
+
463
+ The larger models available in this demo are fine-tuned to follow instructions but have different strengths and will showcase different
464
+ types of watermark behavior. [BLOOMZ (175B)](https://huggingface.co/bigscience/bloomz) is an instruction tuned variant of BLOOM capable of following instructions in dozens of languages zero-shot
465
+ and can generate long and coherent paragraphs and stories given the right prompt.
466
+ The FLAN models [FLAN-t5-xxl (11B)](https://huggingface.co/google/flan-t5-xxl) and [FLAN-UL2 (20B)](https://huggingface.co/google/flan-ul2) are fine-tuned on a variety of in-context few-shot learning NLP tasks,
467
+ such as reasoning, and question answering.
468
+
469
+ Generally, short, low entropy scenarios where the model has very few choices in terms of correct/suitable responses to the prompt
470
+ will not exhibit as strong of a watermark presence, while longer watermarked outputs will produce higher detection statistics.
471
  """
472
  )
473
  gr.Markdown(
 
780
  select_green_tokens.change(fn=detect_partial, inputs=[output_with_watermark,session_args,session_tokenizer], outputs=[with_watermark_detection_result,session_args,session_tokenizer])
781
  select_green_tokens.change(fn=detect_partial, inputs=[detection_input,session_args,session_tokenizer], outputs=[detection_result,session_args,session_tokenizer])
782
 
 
783
  demo.queue(concurrency_count=3)
784
 
785
  if args.demo_public: