[BUG] Reorder model config creation (#26124)

Signed-off-by: ahao-anyscale <ahao@anyscale.com>
Signed-off-by: yewentao256 <zhyanwentao@126.com>
This commit is contained in:
ahao-anyscale 2025-10-02 23:59:36 -07:00 committed by yewentao256
parent 6b12b2ee38
commit d628fa1e56

View File

@ -1131,6 +1131,10 @@ class EngineArgs:
device_config = DeviceConfig(
device=cast(Device, current_platform.device_type))
model_config = self.create_model_config()
self.model = model_config.model
self.tokenizer = model_config.tokenizer
(self.model, self.tokenizer,
self.speculative_config) = maybe_override_with_speculators(
model=self.model,
@ -1139,7 +1143,6 @@ class EngineArgs:
trust_remote_code=self.trust_remote_code,
vllm_speculative_config=self.speculative_config,
)
model_config = self.create_model_config()
# * If VLLM_USE_V1 is unset, we enable V1 for "supported features"
# and fall back to V0 for experimental or unsupported features.