[BugFix] Fix blocked reasoning parsing with MRV2 (#43808)
Signed-off-by: Nick Hill <nickhill123@gmail.com>
This commit is contained in:
@@ -72,7 +72,9 @@ def server():
|
||||
"0.4",
|
||||
"--no-async-scheduling",
|
||||
]
|
||||
with RemoteOpenAIServer(MODEL_NAME, args) as remote_server:
|
||||
# thinking_token_budget is not yet supported by the V2 model runner.
|
||||
env_dict = {"VLLM_USE_V2_MODEL_RUNNER": "0"}
|
||||
with RemoteOpenAIServer(MODEL_NAME, args, env_dict=env_dict) as remote_server:
|
||||
yield remote_server
|
||||
|
||||
|
||||
@@ -88,7 +90,9 @@ def server_with_auto_reasoning_config():
|
||||
"0.4",
|
||||
"--no-async-scheduling",
|
||||
]
|
||||
with RemoteOpenAIServer(MODEL_NAME, args) as remote_server:
|
||||
# thinking_token_budget is not yet supported by the V2 model runner.
|
||||
env_dict = {"VLLM_USE_V2_MODEL_RUNNER": "0"}
|
||||
with RemoteOpenAIServer(MODEL_NAME, args, env_dict=env_dict) as remote_server:
|
||||
yield remote_server
|
||||
|
||||
|
||||
@@ -122,11 +126,12 @@ def server_qwen35_fp8_mtp_tp2():
|
||||
}
|
||||
),
|
||||
]
|
||||
# thinking_token_budget is not yet supported by the V2 model runner.
|
||||
env_dict: dict[str, str] = {"VLLM_USE_V2_MODEL_RUNNER": "0"}
|
||||
# With 4+ GPUs, run TP=2 on physical devices 2,3 so module-scoped 0.6B servers
|
||||
# on 0,1 do not exhaust memory on the same devices as this worker.
|
||||
env_dict = None
|
||||
if current_platform.device_count() >= 4:
|
||||
env_dict = {"CUDA_VISIBLE_DEVICES": "2,3"}
|
||||
env_dict["CUDA_VISIBLE_DEVICES"] = "2,3"
|
||||
|
||||
with RemoteOpenAIServer(
|
||||
QWEN35_FP8_MTP_MODEL,
|
||||
|
||||
+10
-9
@@ -500,14 +500,14 @@ class VllmConfig:
|
||||
|
||||
if not HAS_TRITON:
|
||||
logger.warning_once(
|
||||
"Model runner v2 requires Triton; using the v1 model runner instead."
|
||||
"Model Runner V2 requires Triton; using the V1 model runner instead."
|
||||
)
|
||||
return False
|
||||
|
||||
unsupported = self._get_v2_model_runner_unsupported_features()
|
||||
if unsupported:
|
||||
logger.warning_once(
|
||||
"Model runner v2 does not yet support %s; using the v1 model "
|
||||
"Model Runner V2 does not yet support %s; using the V1 model "
|
||||
"runner instead.",
|
||||
", ".join(unsupported),
|
||||
)
|
||||
@@ -1982,10 +1982,6 @@ class VllmConfig:
|
||||
):
|
||||
unsupported.append("EAGLE3 with pipeline parallelism")
|
||||
|
||||
if self.reasoning_config is not None:
|
||||
# TODO: add reasoning budget enforcement to ModelRunnerV2.
|
||||
unsupported.append("reasoning budget enforcement")
|
||||
|
||||
if self.parallel_config.enable_dbo:
|
||||
unsupported.append("dual batch overlap")
|
||||
|
||||
@@ -2027,13 +2023,18 @@ class VllmConfig:
|
||||
def _validate_v2_model_runner(self) -> None:
|
||||
"""Check for features not yet supported by the V2 model runner."""
|
||||
if not HAS_TRITON:
|
||||
raise ValueError("VLLM_USE_V2_MODEL_RUNNER requires Triton.")
|
||||
raise ValueError("Model Runner V2 requires Triton.")
|
||||
|
||||
unsupported = self._get_v2_model_runner_unsupported_features()
|
||||
if unsupported:
|
||||
raise ValueError(
|
||||
"VLLM_USE_V2_MODEL_RUNNER does not yet support: "
|
||||
+ ", ".join(unsupported)
|
||||
f"Model Runner V2 does not yet support: {', '.join(unsupported)}"
|
||||
)
|
||||
|
||||
if self.reasoning_config is not None:
|
||||
logger.warning_once(
|
||||
"Model Runner V2 does not yet support the thinking_token_budget "
|
||||
"request parameter. Set VLLM_USE_V2_MODEL_RUNNER=0 if this is required."
|
||||
)
|
||||
|
||||
def validate_block_size(self) -> None:
|
||||
|
||||
@@ -49,6 +49,7 @@ class InputProcessor:
|
||||
self.speculative_config = vllm_config.speculative_config
|
||||
self.structured_outputs_config = vllm_config.structured_outputs_config
|
||||
self.observability_config = vllm_config.observability_config
|
||||
self.use_v2_model_runner = vllm_config.use_v2_model_runner
|
||||
|
||||
self.generation_config_fields = model_config.try_get_generation_config()
|
||||
|
||||
@@ -98,15 +99,22 @@ class InputProcessor:
|
||||
self.tokenizer,
|
||||
)
|
||||
|
||||
if params.thinking_token_budget is not None and (
|
||||
self.vllm_config.reasoning_config is None
|
||||
or not self.vllm_config.reasoning_config.enabled
|
||||
):
|
||||
raise ValueError(
|
||||
"thinking_token_budget is set but reasoning_config is "
|
||||
"not configured. Please set --reasoning-config to use "
|
||||
"thinking_token_budget."
|
||||
)
|
||||
if params.thinking_token_budget is not None:
|
||||
if (
|
||||
self.vllm_config.reasoning_config is None
|
||||
or not self.vllm_config.reasoning_config.enabled
|
||||
):
|
||||
raise ValueError(
|
||||
"thinking_token_budget is set but reasoning_config is "
|
||||
"not configured. Please set --reasoning-parser "
|
||||
"and/or --reasoning-config to use thinking_token_budget."
|
||||
)
|
||||
if self.use_v2_model_runner:
|
||||
raise ValueError(
|
||||
"thinking_token_budget is not yet supported by the V2 "
|
||||
"model runner. Run vLLM with VLLM_USE_V2_MODEL_RUNNER=0 "
|
||||
"to use thinking_token_budget."
|
||||
)
|
||||
elif isinstance(params, PoolingParams):
|
||||
supported_pooling_tasks = [
|
||||
task for task in supported_tasks if task in POOLING_TASKS
|
||||
|
||||
Reference in New Issue
Block a user