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
OpenDAS
vllm_cscc
Commits
238c0d93
Unverified
Commit
238c0d93
authored
Dec 13, 2024
by
Alexander Matveev
Committed by
GitHub
Dec 13, 2024
Browse files
[Misc] Add tokenizer_mode param to benchmark_serving.py (#11174)
Signed-off-by:
Alexander Matveev
<
alexm@neuralmagic.com
>
parent
5b0ed839
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
benchmarks/benchmark_serving.py
benchmarks/benchmark_serving.py
+12
-0
No files found.
benchmarks/benchmark_serving.py
View file @
238c0d93
...
@@ -781,6 +781,7 @@ def main(args: argparse.Namespace):
...
@@ -781,6 +781,7 @@ def main(args: argparse.Namespace):
backend
=
args
.
backend
backend
=
args
.
backend
model_id
=
args
.
model
model_id
=
args
.
model
tokenizer_id
=
args
.
tokenizer
if
args
.
tokenizer
is
not
None
else
args
.
model
tokenizer_id
=
args
.
tokenizer
if
args
.
tokenizer
is
not
None
else
args
.
model
tokenizer_mode
=
args
.
tokenizer_mode
if
args
.
base_url
is
not
None
:
if
args
.
base_url
is
not
None
:
api_url
=
f
"
{
args
.
base_url
}{
args
.
endpoint
}
"
api_url
=
f
"
{
args
.
base_url
}{
args
.
endpoint
}
"
...
@@ -790,6 +791,7 @@ def main(args: argparse.Namespace):
...
@@ -790,6 +791,7 @@ def main(args: argparse.Namespace):
base_url
=
f
"http://
{
args
.
host
}
:
{
args
.
port
}
"
base_url
=
f
"http://
{
args
.
host
}
:
{
args
.
port
}
"
tokenizer
=
get_tokenizer
(
tokenizer_id
,
tokenizer
=
get_tokenizer
(
tokenizer_id
,
tokenizer_mode
=
tokenizer_mode
,
trust_remote_code
=
args
.
trust_remote_code
)
trust_remote_code
=
args
.
trust_remote_code
)
if
args
.
dataset
is
not
None
:
if
args
.
dataset
is
not
None
:
...
@@ -1210,5 +1212,15 @@ if __name__ == "__main__":
...
@@ -1210,5 +1212,15 @@ if __name__ == "__main__":
"from the sampled HF dataset."
,
"from the sampled HF dataset."
,
)
)
parser
.
add_argument
(
'--tokenizer-mode'
,
type
=
str
,
default
=
"auto"
,
choices
=
[
'auto'
,
'slow'
,
'mistral'
],
help
=
'The tokenizer mode.
\n\n
* "auto" will use the '
'fast tokenizer if available.
\n
* "slow" will '
'always use the slow tokenizer.
\n
* '
'"mistral" will always use the `mistral_common` tokenizer.'
)
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
main
(
args
)
main
(
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