Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
520198f5
"vscode:/vscode.git/clone" did not exist on "102b5ff4a813eea848bb82ff2f451e0f6b17b30c"
Unverified
Commit
520198f5
authored
Apr 06, 2021
by
Stas Bekman
Committed by
GitHub
Apr 06, 2021
Browse files
[doc] gpt-neo (#11098)
make the example work
parent
9853c5dd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
docs/source/model_doc/gpt_neo.rst
docs/source/model_doc/gpt_neo.rst
+2
-2
No files found.
docs/source/model_doc/gpt_neo.rst
View file @
520198f5
...
...
@@ -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]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment