vLLM transformers 后端性能达原生水平,支持一键运行
原标题:vllmtransformersinference Native-speed vLLM transformers modeling backend 64 July 8, 2026
AI 摘要
Hugging Face 宣布升级 vLLM 的 transformers 建模后端,通过 torch.fx 静态分析和 AST 源码重写,动态应用推理层融合,使 transformers 模型在 vLLM 中达到或超过原生实现的吞吐。在 Qwen3 系列(4B、32B、235B MoE)上验证了性能,用户只需添加 --model-impl transformers 标志即可使用。该集成支持张量并行、专家并行等,并保持模型可编译和可训练。
正文节选
# Upgrade the vllm pip package uv pip install --upgrade vllm --torch-backend auto The transformers library has become the reference modeling library for Machine Learning. It supports 450+ architectures through consistent APIs, and is designed with the main goal that model implementations are self contained and easy to understand. Going through transformers code makes it easy for contributors to learn how an architecture works, and then port it to other frameworks such as vLLM, SGLang, MLX, llama