feat(vllm): support vLLM 0.29 (torch 2.13) + GPU /pooling fixes - #123
Conversation
|
Hello @romeokienzler, thanks for the work! thank you |
|
@romeokienzler thanks for the port — the change is tightly scoped (model API arity, warmup padding, sync IO-processor dispatch, pins) and the commit messages/inline comments explain the why well. Current state: all 11 checks green (incl. What's worth addressing before a maintainer takes it:
No new params/deps that touch |
|
Metric-shift attribution: it's the PyTorch 2.12 → 2.13 bump, not a code regression The integration-test metrics drift vs the committed
Result: C reproduces the historic interval midpoints to 5–8 significant figures on every metric (PBE Mean matches to 8 digits,
Conclusion: the drift is entirely the torch 2.12→2.13 numerics change, not a regression in this branch (which only touches the |
|
@romeokienzler Thanks — the A/B/C control run is exactly the right way to isolate this: holding the code fixed and varying only torch (C vs B) while showing C reproduces the historic seed-0 midpoints to 5–8 sig figs (PBE Mean to 8 digits) cleanly rules out a code regression, consistent with the diff only touching Two small follow-throughs for whoever picks this up:
Still-open from before (unchanged): the Python 3.13 CI decision (@albanpuech's point vs the |
The serving integration targeted the vLLM 0.26 line. algorithm-nexus has since moved its candidate variant to vllm==0.29.0, so port the plugin: - model.py: vLLM 0.29 made get_mm_hashes require a hash-algorithm argument (single-arg on 0.26); source it from the multimodal config, mirroring vLLM's own Terratorch pooling wrapper. This was the only hard-breaking API change; all plugin imports resolve unchanged at 0.29. - pyproject: bump the [vllm] extra to vllm>=0.29,<0.30, and widen the core torch bound to <2.14 so torch 2.13.0 (hard-pinned by vllm 0.29) resolves. An optional extra cannot relax the base pin, so the base bound must admit 2.13. - pyproject: torch 2.13 has no prebuilt torch-scatter wheel on the PyG index yet, so add torch to torch-scatter's build environment ([tool.uv.extra-build-dependencies]) so its sdist builds under uv, and add the torch-2.13.0 PyG find-links. - utils.py: retarget SUPPORTED_VLLM to >=0.29,<0.30. Bump version to 0.9.1 (maintainers may set the final release version). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Romeo Kienzler <romeo.kienzler1@ibm.com>
Two runtime breakages surfaced only under a real GPU serve on vLLM 0.29 (H100), not during import/discovery checks: 1. Warmup index-out-of-bounds. vLLM 0.29's profile_run and the new flashinfer_autotune warmup both call _dummy_run(max_num_batched_tokens), which derives num_reqs = min(num_tokens, max_num_seqs) and packs several tokens per request, then gathers hidden_states[logit_indices] with indices up to num_tokens-1. Our forward returned one row per collated graph item (n_items == num_reqs), so the gather ran off the end (IndexKernel.cu:111). Real requests are 1 token + 1 graph, so num_tokens == n_items and this only bit synthetic warmup. Pad the output's leading (token) axis up to positions.shape[0]; identity on real requests. 2. IO-processor async dispatch. vLLM 0.29's online pooling path calls the synchronous pre_process from inside the running server event loop (get_request_factory_online -> pre_process), but our pre_process wrapped the async variant with asyncio.run(), which raises inside a running loop. Move the (purely synchronous) graph-construction logic into pre_process and make pre_process_async delegate to it. Validated end-to-end on H100: vllm serve --runner pooling over case14_ieee returns HTTP 200 with bus predictions [14 x 4] and gen predictions [5 x 1]. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Romeo Kienzler <romeo.kienzler1@ibm.com>
94094fc to
876dbbd
Compare
|
@romeokienzler The rebase landed — the branch now sits on top of the latest Still open from earlier (no code change since):
Neither blocks a maintainer from looking now; |
Summary
Adds vLLM 0.29 support to
gridfm_graphkit.vllm(the/poolingPowerFlow-reconstruction serving path), superseding the 0.26-only extra shipped in 0.9.0.2. Validated end-to-end on an H100.The current
[vllm]extra pinsvllm>=0.26,<0.27, which is incompatible with downstreams that have moved to vLLM 0.29 (e.g.algorithm-nexus, whose candidate now usesvllm==0.29.0). This branch makes the serving stack run on 0.29 + torch 2.13.What changed
Port (
94e5b73)[vllm]extra tovllm>=0.29,<0.30andSUPPORTED_VLLMto">=0.29,<0.30"; version0.9.0.2 → 0.9.1.torchto>=2.10,<2.14(vLLM 0.29 hard-pinstorch==2.13.0, so the base pin must admit 2.13).torch-scatterwheel on data.pyg.org yet → add[tool.uv.extra-build-dependencies] torch-scatter = ["torch"]+ a torch-2.13.0 find-links entry (source build).ProcessorInputs.get_mm_hashes(model_id)now requires a secondhash_algorithmargument (mirrors vLLM's own built-interratorch.py).GPU runtime fixes (
94094fc) — surfaced only under a real GPU serve on 0.29, not in import/discovery checks:profile_runand the newflashinfer_autotuneboth call_dummy_run(max_num_batched_tokens), which derivesnum_reqs = min(num_tokens, max_num_seqs)and packs several tokens per request, then gathershidden_states[logit_indices]up tonum_tokens-1.forwardreturned one row per collated graph item (n_items == num_reqs), so the gather ran off the end (IndexKernel.cu:111). Real requests are 1 token + 1 graph, sonum_tokens == n_itemsand this only bit synthetic warmup. Fix: pad the output's leading (token) axis up topositions.shape[0]— identity on real requests.pre_processfrom inside the running server event loop, butpre_processwrapped the async variant withasyncio.run(), which raises inside a running loop. Fix: move the (purely synchronous) graph-construction logic intopre_process;pre_process_asyncdelegates.Validation
tests/test_vllm_graph_codec.py,tests/test_vllm_pipeline.py)./poolinge2e on H100 (vLLM 0.29.0 / torch 2.13.0+cu130): random-weight export →vllm serve --runner pooling --io-processor-plugin gridfm_pf_reconstruction→POST /poolingon a case14 case → HTTP 200, bus predictions[14 × 4], gen predictions[5 × 1].Serving requires
VLLM_USE_V2_MODEL_RUNNER=0(0.29's default Model Runner V2 does not support the'plugin'pooling task used by IO-processor plugins; vLLM raises aValueErrornaming this env var). This is a deployment flag, not a code change.Notes for reviewer
@albanpuech — this is the follow-on to #118 (0.26 serving, merged). A 0.29-compatible release to PyPI is needed before
algorithm-nexuscan repin its candidate off0.9.0.2.🤖 Generated with Claude Code