-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Move ModelConfig from config/__init__.py to config/model.py
#25252
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
Conversation
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
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.
Code Review
This pull request refactors the configuration-related code by moving ModelConfig and its helper functions from vllm/config/__init__.py to a new vllm/config/model.py file. It also moves RunnerType to vllm/config/scheduler.py and some utility functions to vllm/config/utils.py. Additionally, ModelImpl and LogprobsMode are converted from Enum to Literal types for easier handling. The changes are consistently applied across the codebase, and the refactoring improves code organization and separation of concerns. I have reviewed the changes and found no issues.
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
| from vllm.config.multimodal import (MMCacheType, MMEncoderTPMode, | ||
| MultiModalConfig) | ||
| from vllm.config.pooler import PoolerConfig | ||
| from vllm.config.utils import assert_hashable, config |
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.
Would using relative imports here lead to circular import issues?
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.
They're not circular because multimodal/pooler/utils doesn't import anything from model
vllm/config/model.py
Outdated
| from vllm.model_executor.layers.quantization import QuantizationMethods | ||
| from vllm.v1.sample.logits_processor import LogitsProcessor | ||
|
|
||
| HfOverrides = Union[dict, Callable[[type], type]] |
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 does this need to be in the TYPE_CHECKING guard?
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.
Not sure, I just copied what was done in __init__.py, I can try taking it out to see what happens?
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.
Yeah let's try that
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
|
PTAL at the doc build failure |
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
…lm-project#25252) Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
### What this PR does / why we need it? Bump main to vllm-project/vllm@c60e613 - Updated imports in `vllm.config` to `vllm.config.model`(vllm-project/vllm@aed1687) vllm-project/vllm#25252 - Refactored `vllm_ascend/sample/sampler.py` to use string values for `logprobs_mode` instead of the `LogprobsMode` enum, simplifying logprobs mode handling and improving compatibility with recent vLLM changes (vllm-project/vllm@aed1687) vllm-project/vllm#25252 ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? CI passed - vLLM version: v0.10.2 - vLLM main: vllm-project/vllm@6d8246a --------- Signed-off-by: Yikun Jiang <yikunkero@gmail.com>
…m-project#3067) ### What this PR does / why we need it? Bump main to vllm-project/vllm@c60e613 - Updated imports in `vllm.config` to `vllm.config.model`(vllm-project/vllm@aed1687) vllm-project/vllm#25252 - Refactored `vllm_ascend/sample/sampler.py` to use string values for `logprobs_mode` instead of the `LogprobsMode` enum, simplifying logprobs mode handling and improving compatibility with recent vLLM changes (vllm-project/vllm@aed1687) vllm-project/vllm#25252 ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? CI passed - vLLM version: v0.10.2 - vLLM main: vllm-project/vllm@6d8246a --------- Signed-off-by: Yikun Jiang <yikunkero@gmail.com>
…m-project#3067) ### What this PR does / why we need it? Bump main to vllm-project/vllm@c60e613 - Updated imports in `vllm.config` to `vllm.config.model`(vllm-project/vllm@aed1687) vllm-project/vllm#25252 - Refactored `vllm_ascend/sample/sampler.py` to use string values for `logprobs_mode` instead of the `LogprobsMode` enum, simplifying logprobs mode handling and improving compatibility with recent vLLM changes (vllm-project/vllm@aed1687) vllm-project/vllm#25252 ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? CI passed - vLLM version: v0.10.2 - vLLM main: vllm-project/vllm@6d8246a --------- Signed-off-by: Yikun Jiang <yikunkero@gmail.com> Signed-off-by: Che Ruan <cr623@ic.ac.uk>
…m-project#3067) ### What this PR does / why we need it? Bump main to vllm-project/vllm@c60e613 - Updated imports in `vllm.config` to `vllm.config.model`(vllm-project/vllm@aed1687) vllm-project/vllm#25252 - Refactored `vllm_ascend/sample/sampler.py` to use string values for `logprobs_mode` instead of the `LogprobsMode` enum, simplifying logprobs mode handling and improving compatibility with recent vLLM changes (vllm-project/vllm@aed1687) vllm-project/vllm#25252 ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? CI passed - vLLM version: v0.10.2 - vLLM main: vllm-project/vllm@6d8246a --------- Signed-off-by: Yikun Jiang <yikunkero@gmail.com> Signed-off-by: Che Ruan <cr623@ic.ac.uk>
…lm-project#25252) Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
…lm-project#25252) Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Signed-off-by: charlifu <charlifu@amd.com>
…lm-project#25252) Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Signed-off-by: xuebwang-amd <xuebwang@amd.com>
…lm-project#25252) Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
…lm-project#25252) Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
…m-project#3067) ### What this PR does / why we need it? Bump main to vllm-project/vllm@c60e613 - Updated imports in `vllm.config` to `vllm.config.model`(vllm-project/vllm@aed1687) vllm-project/vllm#25252 - Refactored `vllm_ascend/sample/sampler.py` to use string values for `logprobs_mode` instead of the `LogprobsMode` enum, simplifying logprobs mode handling and improving compatibility with recent vLLM changes (vllm-project/vllm@aed1687) vllm-project/vllm#25252 ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? CI passed - vLLM version: v0.10.2 - vLLM main: vllm-project/vllm@6d8246a --------- Signed-off-by: Yikun Jiang <yikunkero@gmail.com>
…lm-project#25252) Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Signed-off-by: xuebwang-amd <xuebwang@amd.com>
Part of #18953
Notable changes:
RunnerTypebelongs to the scheduler now (that's where the field actually lives)ModelImplandLogprobsModeboth converted toLiteralfor easier handling (i.e.ModelImpl.VLLMorModelImplVLLM.value? Is not a question we need to cate about anymore)utils.py