"vscode:/vscode.git/clone" did not exist on "102b5ff4a813eea848bb82ff2f451e0f6b17b30c"
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