-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Closed
Labels
performancePerformance-related issuesPerformance-related issuesstaleOver 90 days of inactivityOver 90 days of inactivity
Description
Proposal to improve performance
Observations
The trace under block_pool.get_new_blocks seems quite fragmented. And we do see some optimization chances there.
- [Core] Avoid KVCacheBlock.__eq__ invocations in FreeKVCacheBlockQueue #21005
- Avoid eq invocation against KVCacheBlock dataclass
- [WIP] [Core] Introduce popleft_n and append_n in FreeKVCacheBlockQueue to further optimize block_pool #21222
- Introduce buck append and buck popleft to avoid unnecessary linked list operations
- Avoid incr_ref function invocations
- Avoid self.enable_caching check in the inner for loop
Reproduce
export VLLM_USE_MODELSCOPE=False;
export VLLM_TORCH_PROFILER_DIR=~/vllm_profile; # for profiling
vllm serve facebook/opt-125m \
--swap-space 16 \
--disable-log-requests \
--no-enable-prefix-caching \
--host :: \
--dtype float16
export VLLM_TORCH_PROFILER_DIR=~/vllm_profile; # for profiling
vllm bench serve \
--dataset-name random \
--model facebook/opt-125m \
--served-model-name facebook/opt-125m \
--random-input-len 700 \
--random-output-len 1 \
--endpoint /v1/completions \
--ignore-eos \
--host localhost \
--port 8000 \
--request-rate 200 \
--num-prompts 100 \
--profile
Report of performance regression
N/A
Misc discussion on performance
N/A
Your current environment (if you think it is necessary)
The output of `python collect_env.py`
N/A
Before submitting a new issue...
- Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.
houseroad, yeqcharlotte, ywang96 and mgoin
Metadata
Metadata
Assignees
Labels
performancePerformance-related issuesPerformance-related issuesstaleOver 90 days of inactivityOver 90 days of inactivity