From af7c704efbc01209f63828b1a5a77a4b191d69fc Mon Sep 17 00:00:00 2001 From: Stas Bekman Date: Tue, 6 Apr 2021 13:21:56 -0700 Subject: [PATCH] [doc] gpt-neo make the example work @LysandreJik --- docs/source/model_doc/gpt_neo.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/model_doc/gpt_neo.rst b/docs/source/model_doc/gpt_neo.rst index 652c613a34e530..3a164ee87928ce 100644 --- a/docs/source/model_doc/gpt_neo.rst +++ b/docs/source/model_doc/gpt_neo.rst @@ -38,9 +38,9 @@ The :obj:`generate()` method can be used to generate text using GPT Neo model. ... "previously unexplored valley, in the Andes Mountains. Even more surprising to the " \ ... "researchers was the fact that the unicorns spoke perfect English." - >>> input_ids = tokenizer(unicorns, return_tensors="pt").input_ids + >>> input_ids = tokenizer(prompt, return_tensors="pt").input_ids - >>> gen_tokens = model.generate(ids, do_sample=True, temperature=0.9, max_length=100,) + >>> gen_tokens = model.generate(input_ids, do_sample=True, temperature=0.9, max_length=100,) >>> gen_text = tokenizer.batch_decode(gen_tokens)[0]