"git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "ee298a16a262a6b3b12b8b15232e76516bb562fd"
Unverified Commit 520198f5 authored by Stas Bekman's avatar Stas Bekman Committed by GitHub
Browse files

[doc] gpt-neo (#11098)

make the example work
parent 9853c5dd
......@@ -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]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment