Repository navigation
Make the Transformers modeling backend as fast as native vLLM - #47187
Merged
Merged
Conversation
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Contributor
|
Documentation preview: https://vllm--47187.org.readthedocs.build/en/47187/ |
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Isotr0py
reviewed
Jul 3, 2026
Isotr0py
left a comment
Member
There was a problem hiding this comment.
Great idea about layer fusion through fx graph!
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
hmellor
marked this pull request as ready for review
July 3, 2026 13:05
hmellor
requested review from
AndreasKaratzas,
DarkLight1337,
Harry-Chen,
khluu and
ywang96
as code owners
July 3, 2026 13:05
Isotr0py
approved these changes
Jul 4, 2026
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
NickLucche
pushed a commit
to NickLucche/vllm
that referenced
this pull request
Jul 15, 2026
…roject#47187) Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
philippesic
pushed a commit
to philippesic/vllm-semantic-cache
that referenced
this pull request
Jul 19, 2026
…roject#47187) Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This was referenced Jul 28, 2026
3 of 4 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.
Introduction
For the Transformers modelling backend this PR:
MergedColumnParallelLinearandQKVParallelLinearMoERunnerto enable:tp_planbecomes optional because the fusion passes know correct the TP orientations of the resulting fusionspp_planbecomes optional because vLLM now checks for thenn.ModuleListin the text model and splits thatIt does this by using
torch.fxto detect patterns in the original model and then editing the model instance in place usingastso nothing gets baked in for downstreamtorch.compilecalls.Logs indicate when and where these graph manipulations are happening, e.g.:
Benchmarks
The Transformers modelling backend is now as fast or faster than vLLM implementations for dense/sliding attention and MoE models across all concurrencies tested.
Hybrid full/sliding attention
Run on 1xH100
vllm serve google/gemma-2-2b-itFP8 MoE
Run on 8xH100
vllm serve Qwen/Qwen3-235B-A22B-Instruct-2507-FP8 --enable-expert-parallel --tensor-parallel-size 8Future work