Repository navigation
ENH: Support Qwen3.5 recurrent-state PD handoff - #5630
Conversation
rogercloud
left a comment
There was a problem hiding this comment.
Major
xinference/model/llm/vllm/xavier/engine.py:110— forcingdisable_hybrid_kv_cache_manager=Falsefor every Xavier engine breaks direct handoff for non-recurrent hybrid-attention models on vLLM 0.21 (see inline). Scope it to models with recurrent cache groups.
Minor
xinference/model/llm/vllm/core.py:817— recurrent mode needsenable_prefix_caching=Falseandasync_scheduling=False, but Xavier defaults prefix caching toTrueand neither setting is validated, so the documented launch fails with only amamba_cache_mode=noneerror and async scheduling is silently left on. Default both off for recurrent Xavier launches, or reject them inXavierConnector.__init__with a message naming the settings.xinference/model/llm/vllm/xavier/v1_connector.py:556— malformed/mismatchedblocks_by_groupraises inside the scheduler hook (see inline).xinference/model/llm/vllm/xavier/v1_connector.py:564— stalerequest.num_computed_tokensinupdate_state_after_alloc(see inline).xinference/model/llm/vllm/xavier/v1_connector.py:1195— layout detection skips the 2-block ambiguity guard (see inline).xinference/model/llm/vllm/xavier/test/test_recurrent_handoff.py:77,xinference/model/llm/vllm/xavier/test/test_pd_recurrent_gpu.py:56— missing rejection-path tests and forced conv layout for Xavier (see inline).
Simplification
xinference/model/llm/vllm/xavier/v1_connector.pyL394/L633/L733/L1189: shrink:getattr(self, "_has_recurrent_cache", False)is unnecessary since__init__always sets it. Useself._has_recurrent_cacheas the other call sites do.
net: -0 lines possible (consistency only)
Blocking: no — recommended event: APPROVE
97c4e70 to
bee6299
Compare
|
Addressed all six review threads in final head Recurrent launch defaults now disable prefix caching and async scheduling, with clear errors for enabling either. HMA is defaulted on only for recurrent vLLM 0.21 launches and preserves explicit user settings. Mismatched handoff groups trigger local recomputation before claiming a ticket; grouped loads retain the scheduler-provided local-hit offset. The redundant Validation: 413 passed, 24 skipped, one previously confirmed unchanged-base failure deselected; modified-file pre-commit passed. After rebasing, Xavier's GPU regression passed again (80.02s) with the DS environment override removed, covering default SD layout with actual KV loads and six outputs matching standalone. |
Qwen3.5 text P/D previously failed because Xavier rejected recurrent caches, and the multimodal chat wrapper dropped the producer's KV handoff metadata. This change transfers attention KV and Gated DeltaNet state together through Xavier's xoscar NIXL GPU path, and enables the native NIXL integration for models launched with
language_model_only=True.mamba_cache_mode="none"; recurrent prefix history and speculative decoding remain unsupported. A configured Xavier history budget is not allocated for recurrent models. Full-attention GPU/CPU history behavior is unchanged.Upstream GDN support was merged in vLLM #41869. The merge is included in v0.22.0 but not v0.21.0. Stock 0.21.0 was verified to reject GDN in native NIXL's convolution-state setup; Xavier's custom whole-state transfer works on 0.21.0.
Validation:
test_xavier.py::test_block_trackerassertion also fails on the unchanged base and was excluded from the final focused run.msgfmt, compiled withbuild_i18n.py --all, and the page built in English and all nine maintained languages.Reproduce GPU checks with
XINFERENCE_TEST_PD_RECURRENT_GPU=1andXINFERENCE_TEST_PD_RECURRENT_MODEL_PATHpointing to Qwen3.5-0.8B, then runxinference/model/llm/vllm/xavier/test/test_pd_recurrent_gpu.py. The native case skips vLLM versions below 0.22.0.