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
c85510f9
Unverified
Commit
c85510f9
authored
Jul 24, 2024
by
Fanli Lin
Committed by
GitHub
Jul 23, 2024
Browse files
[docs] change temperature to a positive value (#32077)
fix
parent
bc2adb01
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
docs/source/en/conversations.md
docs/source/en/conversations.md
+1
-1
No files found.
docs/source/en/conversations.md
View file @
c85510f9
...
...
@@ -195,7 +195,7 @@ inputs = {key: tensor.to(model.device) for key, tensor in inputs.items()}
print
(
"Tokenized inputs:
\n
"
,
inputs
)
# 4: Generate text from the model
outputs
=
model
.
generate
(
**
inputs
,
max_new_tokens
=
512
,
temperature
=
0.
)
outputs
=
model
.
generate
(
**
inputs
,
max_new_tokens
=
512
,
temperature
=
0.
1
)
print
(
"Generated tokens:
\n
"
,
outputs
)
# 5: Decode the output back to a string
...
...
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