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
OpenDAS
ColossalAI
Commits
b833153f
Unverified
Commit
b833153f
authored
Feb 19, 2024
by
CZYCW
Committed by
GitHub
Feb 19, 2024
Browse files
[hotfix] fix variable type for top_p (#5313)
Co-authored-by:
binmakeswell
<
binmakeswell@gmail.com
>
parent
705a62a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
applications/Colossal-LLaMA-2/inference_example.py
applications/Colossal-LLaMA-2/inference_example.py
+1
-1
No files found.
applications/Colossal-LLaMA-2/inference_example.py
View file @
b833153f
...
@@ -68,7 +68,7 @@ if __name__ == "__main__":
...
@@ -68,7 +68,7 @@ if __name__ == "__main__":
parser
.
add_argument
(
"--do_sample"
,
type
=
bool
,
default
=
True
,
help
=
"Set whether or not to use sampling"
)
parser
.
add_argument
(
"--do_sample"
,
type
=
bool
,
default
=
True
,
help
=
"Set whether or not to use sampling"
)
parser
.
add_argument
(
"--temperature"
,
type
=
float
,
default
=
0.3
,
help
=
"Set temperature value"
)
parser
.
add_argument
(
"--temperature"
,
type
=
float
,
default
=
0.3
,
help
=
"Set temperature value"
)
parser
.
add_argument
(
"--top_k"
,
type
=
int
,
default
=
50
,
help
=
"Set top_k value for top-k-filtering"
)
parser
.
add_argument
(
"--top_k"
,
type
=
int
,
default
=
50
,
help
=
"Set top_k value for top-k-filtering"
)
parser
.
add_argument
(
"--top_p"
,
type
=
in
t
,
default
=
0.95
,
help
=
"Set top_p value for generation"
)
parser
.
add_argument
(
"--top_p"
,
type
=
floa
t
,
default
=
0.95
,
help
=
"Set top_p value for generation"
)
parser
.
add_argument
(
"--input_txt"
,
type
=
str
,
default
=
"明月松间照,"
,
help
=
"The prompt input to the model"
)
parser
.
add_argument
(
"--input_txt"
,
type
=
str
,
default
=
"明月松间照,"
,
help
=
"The prompt input to the model"
)
parser
.
add_argument
(
"--prompt_style"
,
choices
=
[
"sft"
,
"pretrained"
],
default
=
"sft"
,
help
=
"The style of the prompt"
)
parser
.
add_argument
(
"--prompt_style"
,
choices
=
[
"sft"
,
"pretrained"
],
default
=
"sft"
,
help
=
"The style of the prompt"
)
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
...
...
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