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
parler-tts
Commits
9f34c1b8
Unverified
Commit
9f34c1b8
authored
Aug 13, 2024
by
UncleCode
Committed by
GitHub
Aug 13, 2024
Browse files
Fix typo in INFERENCE.md, change return_tensors and to correct usage of device (#98)
parent
6185106e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
INFERENCE.md
INFERENCE.md
+1
-1
No files found.
INFERENCE.md
View file @
9f34c1b8
...
@@ -62,7 +62,7 @@ model.generation_config.cache_implementation = "static"
...
@@ -62,7 +62,7 @@ model.generation_config.cache_implementation = "static"
model
.
forward
=
torch
.
compile
(
model
.
forward
,
mode
=
compile_mode
)
model
.
forward
=
torch
.
compile
(
model
.
forward
,
mode
=
compile_mode
)
# warmup
# warmup
inputs
=
tokenizer
(
"This is for compilation"
,
return_tensors
=
"pt"
,
padding
=
"max_length"
,
max_length
=
max_length
).
to
(
device
)
inputs
=
tokenizer
(
"This is for compilation"
,
return_tensors
=
"pt"
,
padding
=
"max_length"
,
max_length
=
max_length
).
to
(
torch_
device
)
model_kwargs
=
{
**
inputs
,
"prompt_input_ids"
:
inputs
.
input_ids
,
"prompt_attention_mask"
:
inputs
.
attention_mask
,
}
model_kwargs
=
{
**
inputs
,
"prompt_input_ids"
:
inputs
.
input_ids
,
"prompt_attention_mask"
:
inputs
.
attention_mask
,
}
...
...
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