Close Menu
Versa AI hub
  • AI Ethics
  • AI Legislation
  • Business
  • Cybersecurity
  • Media and Entertainment
  • Content Creation
  • Art Generation
  • Research
  • Tools
  • Resources

Subscribe to Updates

Subscribe to our newsletter and stay updated with the latest news and exclusive offers.

What's Hot

Native-speed vLLM Transformer Modeling Backend

July 10, 2026

Implementing AWS GraphRAG reduced drug research cycles by 87%

July 9, 2026

Data for agents

July 9, 2026
Facebook X (Twitter) Instagram
Versa AI hubVersa AI hub
Friday, July 10
Facebook X (Twitter) Instagram
Login
  • AI Ethics
  • AI Legislation
  • Business
  • Cybersecurity
  • Media and Entertainment
  • Content Creation
  • Art Generation
  • Research
  • Tools
  • Resources
Versa AI hub
Home»Tools»Native-speed vLLM Transformer Modeling Backend
Tools

Native-speed vLLM Transformer Modeling Backend

versatileaiBy versatileaiJuly 10, 2026No Comments4 Mins Read
Share Facebook Twitter Pinterest LinkedIn Tumblr Reddit Telegram Email
#image_title
Share
Facebook Twitter LinkedIn Pinterest Email
Lysandre's Avatar

TL;DR: Transformers vLLM backends are now as fast (or faster) than custom vLLM implementations in many LLM architectures. Modelers can automatically leverage Transformer implementations to achieve ultra-fast vLLM inference for free. uv pip install –upgrade vllm –torch-backend auto

The Transformers library is now a reference modeling library for machine learning. It supports over 450 architectures through a consistent API and is designed with the primary goal of making model implementations self-contained and easy to understand. By reviewing the transformer code, contributors can easily learn how the architecture works and port it to other frameworks such as vLLM, SGLang, MLX, and llama.cpp.

We fully embrace this role in the ecosystem and go to great lengths to facilitate it. A big step in this direction was last year’s integration of Transformers as a modeling backend for vLLM. This allows modelers to run Transformer models (similar to LLM and VLM) within vLLM without porting anything. Transformers provides the modeling code, and vLLM provides highly optimized inference techniques such as continuous batch processing and custom attention kernels.

This integration is even better 🚀!

showcase

We connect vLLM’s Transformer modeling backend directly with vLLM’s hand-written native implementation across three very different Qwen3 models.

4B dense model on a single GPU 32B dense model on tensor parallelism Mix of experts on FP8 data with 235B parameters + expert parallelism on the same 8×H100 nodes

Pre- and post-PR benchmarks using Transformer vllm backend

As a result, the Transformer modeling backend now meets or exceeds native throughput for all Transformers.

A single flag –model-impl transformer runs the * hug face model through the transformer modeling backend. Nothing changes about the service setup as it is configured with the usual parallelism options.

vllmserve Qwen/Qwen3-4B –model-impl transformer vllmserve Qwen/Qwen3-32B –model-impl transformer –tensor-Parallel-size 2 vllmserve Qwen/Qwen3-235B-A22B-FP8 –model-impl transformer –data-Parallel-size 8 –enable-expert-Parallel

*Models using linear attention are currently not supported, but will be supported soon. Custom models whose code resides in the Hub repository are not written compliantly and are unlikely to work.

Measurement method

Each model is compared under three conditions that are identical in all respects except the code path.

Native — –model-impl vllm, vLLM hand-drawn model (matching bars) After — –model-impl transformer (with PR) Before — –model-impl transformer (without PR)

A complete reproducible runner is available at Gist: benchmark.sh

So what’s new?

vLLM’s transformer modeling backend was noted as an inference bottleneck. By plugging in vLLM’s attention implementation at runtime, transformer models can be efficiently executed within the vLLM engine. However, there are many aspects to deployment, and only custom ports are relevant for maximum inference performance. Cross-GPU parallelization, compilation, fused kernels, etc. all help leverage the hardware to achieve ultra-fast inference.

Integrating new models into Transformers and vLLM

The new model was integrated once for transformers and once for vLLM using custom optimizations.

When modelers wanted the absolute best performance, they were still creating custom vLLM implementations.

The new model will be integrated into the transformer and will be available soon on vLLM

Once the new model is integrated into the transformer, it can be immediately used in vLLM at native vLLM implementation speeds.

The latest iteration of vLLM’s transformer modeling backend dynamically applies a fusion of inference-specific layers at runtime to match the speed of custom code implementation for compatible architectures.

How does it work?

vLLM’s Transformer modeling backend now uses torch.fx to perform static analysis on the model’s graph. This process searches for known patterns that can be optimized. Once a pattern is identified, we use an AST (abstract syntax tree) to manipulate the source code and rewrite some operations appropriately.

What can this accomplish?

Fusion operations that map many-to-one to (hyper)optimized vLLM kernels, such as those used for Expert Parallelization (EP) in Mixture-of-Experts (MoE) models. The other main fusion operations are vLLM’s MergedColumnParallelLinear and QKVParallelLinear. These blocks can be used to infer parallel plans for TP (tensor parallelism). If the decoder block list is easily identified, a PP (Pipeline Parallel) plan can also be inferred. The manipulated model is still fully (torch) compilable and passed through torch.compile and the CUDA graph, just like a dedicated vLLM model implementation. Unlike vLLM model implementations, Transformers model implementations can be used for training. Therefore, you can use the same model code for training/evaluation/RL rollout.

As shown above, this enables native vLLM inference speeds for compatible models without having to write a single line of code to optimize the model for inference.

We are in the process of writing a detailed blog post that dives deeper into these optimized inference techniques and details how to manipulate models to adapt to them.

resource

author avatar
versatileai
See Full Bio
Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
Previous ArticleImplementing AWS GraphRAG reduced drug research cycles by 87%
versatileai

Related Posts

Tools

Implementing AWS GraphRAG reduced drug research cycles by 87%

July 9, 2026
Tools

Data for agents

July 9, 2026
Tools

L’Oréal, Mondelez and Nestlé use AI to speed up product development

July 8, 2026
Add A Comment

Comments are closed.

Top Posts

Physical AI Conference Held in San Jose as Robotics and Autonomous AI Go Mainstream

May 14, 20264 Views

Takeda Pharmaceutical signs USD 600 million AI drug discovery agreement with Insilico

July 4, 20263 Views

Which tokens does the hybrid model predict better?

June 27, 20263 Views
Stay In Touch
  • YouTube
  • TikTok
  • Twitter
  • Instagram
  • Threads
Latest Reviews

Subscribe to Updates

Subscribe to our newsletter and stay updated with the latest news and exclusive offers.

Most Popular

Physical AI Conference Held in San Jose as Robotics and Autonomous AI Go Mainstream

May 14, 20264 Views

Takeda Pharmaceutical signs USD 600 million AI drug discovery agreement with Insilico

July 4, 20263 Views

Which tokens does the hybrid model predict better?

June 27, 20263 Views
Don't Miss

Native-speed vLLM Transformer Modeling Backend

July 10, 2026

Implementing AWS GraphRAG reduced drug research cycles by 87%

July 9, 2026

Data for agents

July 9, 2026
Service Area
X (Twitter) Instagram YouTube TikTok Threads RSS
  • About Us
  • Contact Us
  • Privacy Policy
  • Terms and Conditions
  • Disclaimer
© 2026 Versa AI Hub. All Rights Reserved.

Type above and press Enter to search. Press Esc to cancel.

Sign In or Register

Welcome Back!

Login to your account below.

Lost password?