The transformers library's vLLM modeling backend has been updated to match or exceed the throughput of vLLM's hand-written native model implementations. Using torch.fx for static graph analysis and AST manipulation, the backend now dynamically applies inference-specific layer fusions at runtime — including fused MoE expert parallelism kernels and merged parallel linear layers — without requiring model authors to write custom vLLM code. Benchmarks across Qwen3 4B, 32B, and 235B-A22B-FP8 MoE models show parity or better performance versus native vLLM. The integration is activated with a single flag (--model-impl transformers) and supports tensor parallelism, data parallelism, expert parallelism, torch.compile, and CUDA Graphs. A key advantage is that the same transformers model code can be used for training, evals, RL rollouts, and now ultra-fast vLLM inference.

5m read timeFrom huggingface.co
Post cover image
Table of contents
ShowcaseSo, what's new?How does it work?Resources
294 Impressions