← Back to Pull requests

fix(omni-compat): shim v0.34 speculator/warmup imports and sync shim in Omni image build #389

Closed
unknown closed this pull request without merging on Nov 30, 2026 03:06 UTC
View on GitHub
unknown unknown commented on Nov 28, 2026 12:56 UTC
Author

Summary

Unblocks the vllm-omni image build (docker/build_omni_image.sh / docker/omni.Dockerfile) on the pinned v0.32.0 (5df63a7203) base after recent upstream vllm-omni main merges started importing vLLM 0.34 modules/helpers absent from the 0.32 pin:

1. vllm.v1.worker.gpu.spec_decode.speculator_config (BACKPORT, <0.34) — introduced in vllm-omni 6fa14e5c4 (vllm-project/vllm-omni#10713, Higgs Audio v3 INT8 speculative decoding). vllm_omni/engine/arg_utils.py::register_omni_models_to_vllm() unconditionally imports register_speculative_method and HiggsAudioSpeculatorConfig(SpeculatorConfig) at startup even when speculative decoding is unused. Following the existing draft_logits backport pattern, the shim records custom method registrations idempotently (and rejects built-in SpeculativeMethod names with 0.34's ValueError) so Omni startup/CLI imports succeed while SpeculatorConfig instantiation raises NotImplementedError naming vLLM >= 0.34 on the 0.32 pin.
2. vllm.v1.worker.extensible_kv_cache (BACKPORT, <0.34) & vllm.v1.worker.gpu.warmup (ADAPTER, <0.34) — introduced immediately afterward on vllm-omni main in 9ccf5ad7a (vllm-project/vllm-omni#11251, vllm_omni/worker/triton_attention_warmup.py), which imports ensure_kv_cache_blocks / num_committable_kv_blocks and _run_step / _warmup_token_ids and would otherwise fail the in-build tools/check_omni_compat.py gate on current origin/main.
3. Sync checkout omni_compat shim during docker/omni.Dockerfile omni-install — docker/build_omni_image.sh and docker/omni/verify_install.py --sync-shim sync this checkout's pure-Python vllm_musa/omni_compat and vllm_musa_omni_compat_pth.py into the base image's installed vllm_musa wheel before install-pth (without modifying compiled extensions or .dist-info metadata), so Omni image builds on an already-published 0.32 base image (whose baked vllm-musa wheel predates the newest drift entries) immediately pick up the updated shim.

All three entries are gated with applies_to="<0.34" (verified absent in v0.33.0 and native in v0.34.0), stdlib-only at module top-level for vllm_musa_omni_compat_pth, and leave non-Omni vllm-musa runtime paths untouched.

Validation

Local offline checks


  • ruff 0.15.1 (check + format --check) and typos 1.43.5 on all touched files: PASS

  • pytest -q tests/test_omni_compat.py tests/test_omni_headless_wheels.py tests/test_musa_docker_contract.py (Python 3.12.8): 97 passed (paired positive/negative coverage for 0.32.0 pin bridging, 0.34.0 native passthrough, built-in method rejection, and --sync-shim stale-wheel replacement)

  • python tools/check_omni_compat.py --vllm-root <vllm@5df63a7203>/vllm --vllm-version 0.32.0 against vllm-omni origin/main c3207dbe6eb0661ace748393c407a5692f9ffd7f: PASS (4671 vllm imports, 20 shimmed, 0 unshimmed; 185 module attributes, 2 shimmed, 0 missing; 0 breaking calls; 16 entries needed, 0 stale)
  • Remote S5000 image build & runtime verification (f03c11d28)


  • Host / Hardware: 1x MTT S5000 (81920 MiB), driver 5.2.0-server, MUSA 50200, Python 3.12.16, torch/torch-musa 2.13.0.post1+musa5.2.0, torchada 0.1.111, mate-mubin 0.2.8.post1, flash-attn-3 0.2.8.post1+musa

  • Base image: registry.mthreads.com/mcctest/inference/vllm:v0.32.0-ph1-5.2.0-torch2.13.0.post1-20261128@sha256:549baa116dea2c05b295360f3e2e8eb5824d5dae9fd72450d1c38004fa2fc178 (baked vllm-musa revision dec6155e8cf5, pre-shim update)

  • Omni revision: origin/main @ c3207dbe6eb0661ace748393c407a5692f9ffd7f (vllm-omni==0.32.0+musa.gc3207dbe6)

  • bash docker/build_omni_image.sh --target omni & --target test: PASS — both production wheel (sha256:c62fc78e14d248dcd9c601705d50fda18190bc8d9860a4864851886013885e9b) and editable test (sha256:2392d1472876eda75eda2f9a58d4601f53daf73929e346110ed9880954e9f3c9) images passed --sync-shim, install-pth, pip check, verify_install.py (--mode wheel / --mode editable), check_omni_compat.py (4671 checked, 20 shimmed, 0 unshimmed), and verify_shim.py --driverless (rebind_exercised: true)

  • CPU CLI check: docker run --rm --runtime=runc ... vllm serve --omni --help -> PASS (exit 0, delegated cleanly to vllm-omni)

  • MUSA S5000 hardware shim check (--runtime=mthreads):

  • - python /opt/omni-compat/verify_shim.py --require-omni -> PASS (verdict: pass, failures: [], hooks: {adapt: true, serve: true, startup: true}, rebind_exercised: true, vllm_omni_version: 0.32.0+musa.gc3207dbe6)
    - register_omni_models_to_vllm() + import vllm_omni.worker.triton_attention_warmup on S5000 -> PASS (registered_speculative_methods() == ["higgs_audio_int8"])
  • Qwen-Image-2.1 BF16 end-to-end serving smoke (docs/cookbook/qwen-image/qwen-image-2.1-bf16.md):

  • - Launched production wheel image (sha256:c62fc78e14d2...) on 1x MTT S5000 (TORCHINDUCTOR_COMPILE_THREADS=1, MUSA_VISIBLE_DEVICES=0, vllm serve /models/Qwen-Image-2.1 --omni); server confirmed FLASH_ATTN diffusion attention backend + regional torch.compile across 32 QwenImage21TransformerBlocks
    - POST /v1/images/generations (512x512, 8 steps, seed=42, true_cfg_scale=1.0): HTTP 200 in 0.584s, valid 512x512 PNG (1,049,236 bytes, SHA-256 8ef69fa8bec1dd787558f6b0768a951a0b94204a47a578962ee7b0181868c5f7)
    - POST /v1/images/generations (1024x1024, 20 steps, seed=42, true_cfg_scale=1.0, prompt "a photorealistic latte in a white ceramic cup on a wooden table, morning light"): HTTP 200 in 4.121s, valid 1024x1024 PNG (4,195,716 bytes, SHA-256 92b02e683d036fca6c58ed1696aecaa83b6623e50e249cb4968829bc11ebc9fa), visually verified coherent photorealistic latte output matching the prompt

    Not run


  • Autoregressive talker / multi-GPU Omni models (e.g., Qwen3-Omni, Higgs Audio v3; custom v0.34 SpeculatorConfig drafters remain explicitly unsupported on the vLLM 0.32 pin).
  • Diff: 650 lines (+487 / -163) across 8 files Reviewer: yeahdongcn Review duration: 2289m
    All Vouch review confidence checks passed
    Residual risk 0.23 = Change Risk (0.57) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.57 · 650 lines diff across 8 files
    0.57
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.388
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #389"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 57% (MEDIUM) · Higher = larger blast radius
    57%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 22.5% · Safe to merge
    22.5%