Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
f4014e75
Unverified
Commit
f4014e75
authored
May 16, 2024
by
Joao Gante
Committed by
GitHub
May 16, 2024
Browse files
Docs: update example with assisted generation + sample (#30853)
parent
95b3c381
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
docs/source/ko/generation_strategies.md
docs/source/ko/generation_strategies.md
+1
-1
No files found.
docs/source/ko/generation_strategies.md
View file @
f4014e75
...
...
@@ -333,5 +333,5 @@ culture, and they allow us to design the'
>>>
assistant_model
=
AutoModelForCausalLM
.
from_pretrained
(
assistant_checkpoint
)
>>>
outputs
=
model
.
generate
(
**
inputs
,
assistant_model
=
assistant_model
,
do_sample
=
True
,
temperature
=
0.5
)
>>>
tokenizer
.
batch_decode
(
outputs
,
skip_special_tokens
=
True
)
[
'Alice and Bob
are going to the same party. It is a small party, in a small
'
]
[
'Alice and Bob
, who were both in their early twenties, were both in the process of
'
]
```
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