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
fd639e5b
"git@developer.sourcefind.cn:orangecat/ollama.git" did not exist on "fd048f13678b66037d11c74a930c08385d269cc7"
Commit
fd639e5b
authored
Feb 10, 2020
by
Lysandre
Browse files
Correct quickstart example when using the past
parent
63a5399b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
docs/source/quickstart.md
docs/source/quickstart.md
+1
-1
No files found.
docs/source/quickstart.md
View file @
fd639e5b
...
...
@@ -209,7 +209,7 @@ past = None
for
i
in
range
(
100
):
print
(
i
)
output
,
past
=
model
(
context
,
past
=
past
)
token
=
torch
.
argmax
(
output
[
0
,
:])
token
=
torch
.
argmax
(
output
[
...,
-
1
,
:])
generated
+=
[
token
.
tolist
()]
context
=
token
.
unsqueeze
(
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