Repository navigation
docs: Document selecting the Rust vLLM gRPC servicer: smg serve --servicer-impl and SMG_VLLM_SERVICER_IMPL - #105
Merged
Conversation
Signed-off-by: XinyueZhang369 <zoeyzhang369@gmail.com>
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
slin1237
marked this pull request as ready for review
October 3, 2026 15:43
slin1237
requested review from
CatherineSue,
key4ng and
slin1237
as code owners
October 3, 2026 15:43
This was referenced Oct 6, 2026
2 of 3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
How do I run vLLM gRPC workers on the Rust servicer implementation — which smg serve flag or worker environment variable selects it, what is the default, which backend/connection-mode combinations are valid, and what must be installed for the selection to take effect instead of silently running Python?
Why we need it
Source change: smg-project/smg@1a32255
Commit 5 (#2727, 1a322557, 2026-10-02) added a launch-time switch between two implementations of the vLLM gRPC servicer, verified on current main. bindings/python/src/smg/serve.py: add_serve_args declares --servicer-impl with default python and choices python/rust (lines ~773-782: 'rust keeps the same vLLM gRPC contract but serves it from Rust over a same-host ZMQ engine connection, selected through SMG_VLLM_SERVICER_IMPL in the worker's environment; requires --backend vllm --connection-mode grpc'); VllmWorkerLauncher.gpu_env (lines 268-281) sets SMG_VLLM_SERVICER_IMPL=rust in each worker's environment only for connection_mode grpc + servicer_impl rust, and otherwise pops an inherited value ('The flag is authoritative'); parse_serve_args (lines ~880-891) rejects --servicer-impl rust for any backend/connection-mode other than vllm/grpc and calls _require_rust_servicer_hook (lines ~835-844), which fails fast when smg-grpc-servicer is not importable or the installed vLLM lacks the hook. grpc_servicer/smg_grpc_servicer/vllm/rust.py: SERVICER_IMPL_ENV="SMG_VLLM_SERVICER_IMPL" (line 55); resolve_servicer_impl (lines 451-469) reads args.servicer_impl, else the env var, else python; upstream_hook_installed (lines 486-511) scans the installed vLLM's entrypoints tree for the resolve_servicer_impl hook; require_upstream_hook (lines 517-525) refuses a rust selection on a vLLM without the hook; require_python_impl (lines 472-481) makes the Python servicer itself refuse to start when the flag asks for rust, so misconfiguration fails loudly rather than silently serving Python. The env-var path works on upstream's own entrypoint unchanged: SMG_VLLM_SERVICER_IMPL=rust python -m vllm.entrypoints.grpc_server ... (grpc_servicer/README.md section 'Rust request path (SMG_VLLM_SERVICER_IMPL=rust)'), and Rust mode additionally needs the smg wheel, which carries the smg.servicer.VllmGrpcServer binding (bindings/python/src/smg/servicer.py). The Router cannot tell the two implementations apart (rust.py module doc, line 13), and the Python implementation stays the default. Tests pin the CLI contract: test_rust_servicer_is_a_worker_env_flag_not_a_command and test_python_servicer_clears_an_inherited_rust_flag (bindings/python/tests/test_serve.py). Docs gap: a repo-wide grep for servicer-impl, SMG_VLLM_SERVICER_IMPL, VllmGrpcServer, and engine_servicer finds nothing in src/lib/content; getting-started/index.md's smg serve options table (lines 166-176) lists --backend and --connection-mode but not --servicer-impl, and getting-started/grpc-workers.md's 'Start a gRPC Worker' vLLM tab (lines 44-51) shows only the default Python-servicer start. Version caveat: the commit landed after the v1.11.0 bump (commit 37, #2670, 2026-09-24), so the edit must present the flag as current-main behavior without promising a release. This is one independent concern: one commit's launch-time selection surface (flag, env var, default, valid combinations, fail-fast requirements), documented where vLLM gRPC workers are started. The Rust servicer's runtime serving contract and the --mm-processor smg media mode it enables (commit 3, #2741) are the grpc-multimodal scan's charter — and the only page enumerating --mm-processor values (concepts/architecture/multimodal.md:117) is locked by open PR #103 — so they are deliberately excluded. No open or closed PR mentions the Rust servicer.
Scope: cli-configuration / vllm-rust-servicer-selection. Other concerns are deferred.
How to test
git diff --checkandpnpm checkand the productionpnpm build.Checklist