feat: append vit executor for qwen3 vl model - #2207
Open
AmpereKowk wants to merge 4 commits into
Open
Conversation
AmpereKowk
requested review from
DongheJin,
DragonFive,
JimHsiung,
Kang-Meng,
liujinguang0125,
liutongxuan,
ustcfy,
xiao-yu-chen,
yingxudeng,
yinjiawei01 and
zhang-minchao
as code owners
August 12, 2026 07:24
AmpereKowk
force-pushed
the
qwen3_vl_executor
branch
3 times, most recently
from
August 18, 2026 13:18
b522245 to
2f6eb1f
Compare
…oPE + video) Serve Qwen3-VL-32B-Instruct through the Python model executor (--model_impl=python --python_graph_backend=aclgraph --backend=vlm): the ViT, deepstack merger (visual indexes [8,16,24]), mRoPE, and the LLM residual injection all run inside the Python nn.Module graph (xllm/python/models/qwen3_vl.py). The C++ side handles only multimodal request parsing / preprocessing / scheduling (--backend=vlm), independent of --model_impl. - mRoPE via torch_npu.npu_mrope(rotary_mode="half", cache_mode="interleave"), verified bit-identical to the HF apply_rotary_pos_emb reference. - PyExecutorImpl wires vision encode -> get_input_embeddings on prefill steps and collapses mRoPE decode positions [3,N] to 1-D for the aclgraph decode path. - Image AND video inputs: pixel_values/image_grid_thw and pixel_values_videos/video_grid_thw are forwarded to encode + scatter at their placeholder positions (image_token_id / video_token_id masks); VideoHandler now accepts local file:// URLs, mirroring ImageHandler. - The image processor delegates to HF AutoImageProcessor for the python path. Scope: the embedding scatter assumes enable_chunked_prefill=False (shipped default). Chunked-prefill item-level scatter + the NPU paged mixed-batch attention are tracked for a follow-up PR. Verified on 8-card TP (Qwen3-VL-32B, --model_impl=python, --enable_chunked_prefill=False): image and video requests return correct output; 8x concurrent image and 8x concurrent video are stable. Tests: tests/python/test_qwen3_vl_scatter.py, test_qwen3_vl_video_encode.py. Co-Authored-By: Claude <noreply@anthropic.com> # Conflicts: # xllm/python/registry.py
AmpereKowk
force-pushed
the
qwen3_vl_executor
branch
from
August 20, 2026 06:53
058645d to
22425ca
Compare
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.
Description
Change Type
Pull Request Checklist
Thank you for contributing to xLLM. Before requesting review, please make sure the following items are complete.
PR Title and Commit Messages
<type>: <subject>.Pre-commit Checks
pre-commitby runningpip install pre-commitor an equivalent command.pre-commit install.pre-commit run --all-filesand fixed any reported issues.Self Review
.agents/skills/code-review/references/custom-code-style.md, especially code written or assisted by AI.mainbranch.Build and Test Coverage
python setup.py build testhas passed on a CUDA machine.python setup.py build testhas passed on an NPU machine.python setup.py build testhas passed on an MLU machine.Reviewer Notes