Skip to content

Conversation

@hmellor
Copy link
Member

@hmellor hmellor commented Sep 19, 2025

Part of #18953

Notable changes:

  • RunnerType belongs to the scheduler now (that's where the field actually lives)
  • ModelImpl and LogprobsMode both converted to Literal for easier handling (i.e. ModelImpl.VLLM or ModelImplVLLM.value? Is not a question we need to cate about anymore)
  • A few fuctions that are not directly related to any config have been moved to utils.py

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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>
Comment on lines +20 to +23
from vllm.config.multimodal import (MMCacheType, MMEncoderTPMode,
MultiModalConfig)
from vllm.config.pooler import PoolerConfig
from vllm.config.utils import assert_hashable, config
Copy link
Member

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?

Copy link
Member Author

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

from vllm.model_executor.layers.quantization import QuantizationMethods
from vllm.v1.sample.logits_processor import LogitsProcessor

HfOverrides = Union[dict, Callable[[type], type]]
Copy link
Member

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?

Copy link
Member Author

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?

Copy link
Member

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>
@DarkLight1337
Copy link
Member

PTAL at the doc build failure

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
@hmellor hmellor enabled auto-merge (squash) September 19, 2025 13:57
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Sep 19, 2025
@hmellor hmellor added the ci-no-fail-fast Disable fail-fast behavior of CI tests (continue with remaining tests after failures). label Sep 19, 2025
@hmellor hmellor merged commit aed1687 into vllm-project:main Sep 19, 2025
55 of 57 checks passed
@hmellor hmellor deleted the extract-model-config branch September 19, 2025 16:22
debroy-rh pushed a commit to debroy-rh/vllm that referenced this pull request Sep 19, 2025
…lm-project#25252)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
wangxiyuan pushed a commit to vllm-project/vllm-ascend that referenced this pull request Sep 21, 2025
### 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>
weijinqian0 pushed a commit to weijinqian0/vllm-ascend that referenced this pull request Sep 22, 2025
…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>
Mercykid-bash pushed a commit to Mercykid-bash/vllm-ascend that referenced this pull request Sep 22, 2025
…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>
Mercykid-bash pushed a commit to Mercykid-bash/vllm-ascend that referenced this pull request Sep 22, 2025
…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>
FeiDaLI pushed a commit to FeiDaLI/vllm that referenced this pull request Sep 25, 2025
…lm-project#25252)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
charlifu pushed a commit to ROCm/vllm that referenced this pull request Sep 25, 2025
…lm-project#25252)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: charlifu <charlifu@amd.com>
xuebwang-amd pushed a commit to xuebwang-amd/vllm that referenced this pull request Oct 10, 2025
…lm-project#25252)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: xuebwang-amd <xuebwang@amd.com>
choprahetarth pushed a commit to Tandemn-Labs/vllm that referenced this pull request Oct 11, 2025
…lm-project#25252)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
lywa1998 pushed a commit to lywa1998/vllm that referenced this pull request Oct 20, 2025
…lm-project#25252)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Angazenn pushed a commit to Angazenn/vllm-ascend that referenced this pull request Oct 21, 2025
…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>
xuebwang-amd pushed a commit to xuebwang-amd/vllm that referenced this pull request Oct 24, 2025
…lm-project#25252)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: xuebwang-amd <xuebwang@amd.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-no-fail-fast Disable fail-fast behavior of CI tests (continue with remaining tests after failures). new-model Requests to new models ready ONLY add when PR is ready to merge/full CI is needed v1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants