Hugging Face transformers backend now reaches native vLLM speed on Qwen3 MoE, dense models
Hugging Face and vLLM achieved native inference speed for transformers models without custom optimization. The transformers modeling backend for vLLM, which lets any Hugging Face model run inside vLLM without porting, now matches or exceeds hand-written vLLM implementations on benchmarks spanning Qwen3-4B (single GPU), Qwen3-32B (tensor-parallel), and Qwen3-235B FP8 MoE (data + expert parallelism) on 8×H100 nodes. The key change is dynamic layer-fusion at runtime using torch.fx graph analysis to identify optimization patterns, then AST rewriting to fuse operations into vLLM's ultra-optimized kernels.
Previously, model authors had to integrate once for transformers (for research/training) and separately for vLLM (for production serving). Now a single transformers implementation automatically gets vLLM-native inference speed for compatible architectures. The runtime fusion targets operations like MergedColumnParallelLinear and QKVParallelLinear, infers parallelization plans for tensor-parallel and pipeline-parallel, and remains fully torch.compile and CUDA Graph compatible.
The impact is architectural. Teams can now use the same model code across training, evaluation, RL rollouts, and production inference without maintaining separate optimized paths. Running any Hugging Face model is a single flag: --model-impl transformers, which composes with usual parallelism options (--tensor-parallel-size, --data-parallel-size, --enable-expert-parallel) with no serving setup changes.
For infrastructure teams, the value is time-to-production and consistency. Every new architecture added to transformers immediately gains native inference performance without waiting for custom vLLM ports. The inference bottleneck shifts from attention kernels to broader system-level optimizations (parallelization, compilation, fused kernels), reducing the engineering cost of deploying frontier models at scale.