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
510401e2
Commit
510401e2
authored
Oct 30, 2024
by
zhuwenwen
Browse files
fix the problem of poor second inference performance in triton
parent
1428c17d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
benchmarks/benchmark_prefix_caching.py
benchmarks/benchmark_prefix_caching.py
+3
-0
No files found.
benchmarks/benchmark_prefix_caching.py
View file @
510401e2
...
...
@@ -35,6 +35,8 @@ from transformers import PreTrainedTokenizerBase
from
vllm
import
LLM
,
SamplingParams
from
vllm.utils
import
FlexibleArgumentParser
from
triton.common.backend
import
compute_core_version_key
try
:
from
vllm.transformers_utils.tokenizer
import
get_tokenizer
except
ImportError
:
...
...
@@ -44,6 +46,7 @@ PROMPT = "You are a helpful assistant in recognizes the content of tables in mar
def
test_prefix
(
llm
=
None
,
sampling_params
=
None
,
prompts
=
None
):
version_key
=
compute_core_version_key
()
start_time
=
time
.
time
()
llm
.
generate
(
prompts
,
sampling_params
=
sampling_params
)
...
...
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