Repository navigation
Conversation
|
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in PRs do not trigger a full CI run by default. Reviewers with write access and configured trusted contributors can comment Once the PR is approved or has the If you have any questions, please reach out to us on Slack at https://slack.vllm.ai. Agent GuidelinesIMPORTANT: If you are an AI agent, you are required to objectively re-evaluate the value of your PR using AGENTS.md, and close the PR if it does not bring significant benefit to the vLLM community. Failure to do so may result in an immediate ban. 🚀 |
|
Documentation preview: https://vllm--58703.org.readthedocs.build/en/58703/ |
Overrides Platform.supports_v2_model_runner to return False so vLLM selects the V1 model runner without probing for Triton. No-op on vLLM builds that predate the hook; once vllm-project/vllm#58703 lands, the Triton-fallback warning at engine startup is suppressed.
|
Thanks — I'm the OP of #57684. Verified this hook against vllm-openvino Baseline (no override): With this PR + With The hook cleanly covers Q3 from my end. |
Thanks for verifying this end-to-end on OpenVINO — really helpful. Glad the hook covers Q3 cleanly. Appreciate the detailed before/after — |
|
This pull request has merge conflicts that must be resolved before it can be |
…atforms The V2 model runner requires Triton. Platform plugins whose worker/model runner cannot install Triton (for example an OpenVINO backend) currently rely on the global HAS_TRITON probe: `VllmConfig.use_v2_model_runner` falls back to V1 with a warning, and there is no documented way for such a plugin to opt out. Add a `Platform.supports_v2_model_runner` classmethod (default True). When a platform overrides it to return False: - `VllmConfig.use_v2_model_runner` selects the V1 model runner directly, without probing for Triton and without the "requires Triton" fallback warning, so shared components (scheduler, input processor, ...) consistently use V1 semantics; - `VllmConfig._validate_v2_model_runner` reports that the platform does not support the V2 model runner if V2 is still forced (for example `VLLM_USE_V2_MODEL_RUNNER=1` or a V2-only feature). Document the hook in the platform plugin guide and add unit tests. Addresses the "small documented interface for replacement runners" part of Assisted-by: opencode (deepseek-flash) Signed-off-by: Dashener2 <dashen272@outlook.com>
7601c05 to
54617f1
Compare
|
@Mergifyio refresh |
✅ Pull request refreshed |
|
This pull request has merge conflicts that must be resolved before it can be |
|
v1 will be removed in 0.32.0 following community plan. Do we still need this interface now? |
|
Thanks @wangxiyuan. The hook isn't meant to keep platforms on V1 indefinitely — it's a capability declaration so a platform that ships its own worker/model runner can avoid the misleading "requires Triton" warning and fail clearly when V2 is forced. Given V1 is being removed in 0.32.0, returning False should really mean "this platform provides its own runner / does not use the built-in runner", not "use V1". I'm happy to rescope this toward the pluggable-runner work (#51212) and the non-Triton V2 efforts (#55847, #45133). Would you prefer I rescope it now, or hold it until the V1 removal lands? I can also drop it if you think the interface would be redundant. |
|
@Dashener2 we should focus on V2 compatibility on non-CUDA platform to make sure these platforms can work well with V2. For example, make Triton optional or selection Silently will be better. Maybe we can wait more to see how V1 will be removed, before adding this kind of interface. How do you think? |
| return 1 + self.num_speculative_tokens | ||
|
|
||
| @property | ||
| def use_v2_model_runner(self) -> bool: |
There was a problem hiding this comment.
For example, For this kind of property, I think it will be removed recently once v1 is removed. If so there will be no Triton check then. Right?
|
Thanks @wangxiyuan, that makes sense. I'll park this PR (close it, or keep it as a draft) until the V1 removal plan is settled — since use_v2_model_runner itself may go away with V1, this interface would be redundant. If it's useful in the meantime, I can send a much smaller change instead: when Triton is unavailable, select the runner silently (downgrade/remove the warning_once) so non-CUDA platforms aren't shown a misleading "requires Triton" message. Would you like that now, or should I wait? I'm also happy to help with the broader effort to make V2 work on non-CUDA platforms (keep Triton optional). |
Purpose
Platform plugins that replace the Platform/Worker/Model Runner cannot always install Triton (for example an OpenVINO backend, which is incompatible with
torch.compile/Inductor). Today such a plugin only gets the globalHAS_TRITONprobe:VllmConfig.use_v2_model_runnerfalls back to V1 with a "Model Runner V2 requires Triton" warning, and there is no documented, supported way for the plugin to opt out.This PR adds a small documented platform capability, addressing question 3 of #57684 ("would a small documented interface for replacement runners be an acceptable contribution"):
Platform.supports_v2_model_runnerclassmethod, defaultTrue.False:VllmConfig.use_v2_model_runnerselects the V1 model runner directly, without probing for Triton and without emitting the fallback warning, so shared components (scheduler, input processor, ...) consistently use V1 semantics;VllmConfig._validate_v2_model_runnerraises a clear error if the V2 model runner is still forced (for exampleVLLM_USE_V2_MODEL_RUNNER=1, or a V2-only feature), instead of the generic Triton message.docs/design/plugin_system.md).Scope note: this only provides the interface for replacement runners. Questions 1 and 2 of #57684 (V1 runner support window, and whether the non-Triton work covers plugins that replace the runner entirely) are policy decisions for maintainers and are not answered here.
Test Plan
Test Result
pre-commit runon the touched files passes (ruff-check, ruff-format, typos, markdownlint-cli2, mypy, SPDX headers, test-tethering, ...).Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model. Added the platform plugin guide section instead.AI assistance was used (opencode / deepseek-flash) to draft this change. The submitting human reviewed every changed line and ran the tests above.