-
-
Notifications
You must be signed in to change notification settings - Fork 11.5k
[Model] Improve enable chunked_prefill & prefix_caching logic. #26623
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: wang.yuqi <[email protected]>
c8e46f4 to
aa55dab
Compare
Signed-off-by: wang.yuqi <[email protected]>
Signed-off-by: wang.yuqi <[email protected]>
Signed-off-by: wang.yuqi <[email protected]>
tests/models/language/pooling/test_auto_prefix_cache_support.py
Outdated
Show resolved
Hide resolved
Signed-off-by: wang.yuqi <[email protected]>
Signed-off-by: wang.yuqi <[email protected]>
Signed-off-by: wang.yuqi <[email protected]>
Signed-off-by: wang.yuqi <[email protected]>
Signed-off-by: wang.yuqi <[email protected]>
Signed-off-by: wang.yuqi <[email protected]>
Signed-off-by: wang.yuqi <[email protected]>
Signed-off-by: wang.yuqi <[email protected]>
Signed-off-by: wang.yuqi <[email protected]>
Signed-off-by: wang.yuqi <[email protected]>
zhuohan123
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need a new class for bool? I think these kind of classes add mental overhead for no good reason. Will leave more comments tmrw.
BoolWithReason is a great method that combines the reasons why a feature can't be enabled, making the code cleaner, improving readability and testability. Perhaps the name BoolWithReason isn't perfect, but we need similar functionality. (This part of the code is a complete nightmare, and it keeps biting us. Let’s refactor it so we can all have a life again!) |
hmellor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, all the reasons should just be warnings
Signed-off-by: wang.yuqi <[email protected]>
Signed-off-by: wang.yuqi <[email protected]>
Signed-off-by: wang.yuqi <[email protected]>
| default = ( | ||
| default.default | ||
| if default.default_factory is None | ||
| # FIXME: A default vllm_config will be constructed here. | ||
| # Info logs will be output, which is confusing. | ||
| else default.default_factory() | ||
| ) | ||
| elif field.default_factory is not MISSING: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A default vllm_config will be constructed here, including the creation of a default SchedulerConfig, and the following info log will be output, which is confusing.
For example, BAAI/bge-base-en does not support chunked prefill, so chunked prefill is not used by default.
vllm serve BAAI/bge-base-en
INFO 11-22 15:35:41 [config/scheduler.py:207] Chunked prefill is enabled with max_num_batched_tokens=2048.
Improve all pooling task
These PRs are mostly conflicting with each other, so combining them into a series would better inform reviewers about what happened. And what else needs to be done after that?
Purpose
Improve enable chunked_prefill & prefix_caching logic.
Address:
Test Plan
pytest -s -vvv tests/test_config.py::test_is_chunked_prefill_supported
pytest -s -vvv tests/test_config.py::test_is_prefix_caching_supported
pytest -s -vvv tests/models/language/pooling/test_auto_prefix_cache_support.py
Test Result
pass
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.