Native-speed vLLM transformers modeling backend
The transformers modeling backend in vLLM now meets or beats vLLM's hand-written native implementations across dense and MoE Qwen3 models. Model authors get ultra-fast vLLM inference from their transformers implementation with a single --model-impl transformers flag.
Marked as a signal by the editors; worth tracking.
On this page12 sections
The full write-up and the editors' notes are in Chinese; the summary above is from the original announcement.
Record
The signal
#Transformers 库支持 450 多种模型架构,长期扮演着「参考建模库」的角色:模型作者先在 Transformers 里实现,再由 vLLM、SGLang、MLX、llama.cpp 等推理框架逐个移植。去年 vLLM 集成了 Transformers 作为建模后端,让模型无需移植即可运行——但性能一直落后于手写原生实现。
这次的更新改变了这一点。Hugging Face 在三个差异很大的 Qwen3 模型上做了头对头对比:单卡 4B 稠密模型、张量并行的 32B 稠密模型、以及 8×H100 上数据并行 + 专家并行的 235B FP8 MoE。结果是 Transformers 后端在全部三档上追平或反超原生实现。使用方式只是一个开关(--model-impl transformers),与现有并行配置完全兼容;目前的例外是线性注意力类模型(官方表示即将支持)。
这件事的生态意义大于单点性能:模型实现只需写一次 Transformers 版本,就能同时获得可读的参考实现和生产级推理性能,「参考实现 vs 高性能实现」的二选一正在消失。对推理团队来说,新架构模型的可用时间差(Transformers 先可用、vLLM 原生实现晚数周)也随之消失。
Why now
Why it matters
#它消除了「参考实现」与「高性能实现」之间的移植成本:新模型在 Transformers 里实现一次,就能立即以 vLLM 级性能上线。这会显著缩短新架构从发布到可生产部署的时间差。
Background
Technical context
#Transformers 提供建模代码(前向计算与权重定义),vLLM 提供连续批处理、自定义注意力内核等服务优化,两者通过 --model-impl 契约组合。基准对比在相同服务配置下只切换代码路径(native / transformers before / after)。
Audience
Who should care
#Next
Learning path
#- 理解建模库与推理引擎的分工:模型实现、执行优化分别在哪一层
- 用 --model-impl transformers 与原生实现各跑一次相同负载,对比吞吐
- 跟踪线性注意力等尚未支持的架构类型的进展
Network
Where it sits in the network
#How this signal connects to neighbouring technologies, skills and background knowledge. Follow any link to keep exploring.
Further thought
Follow-up questions
#- 你在用的模型架构是否在 450+ 支持列表里?
- 线性注意力模型的支持何时落地?
- SGLang、MLX 等其他推理框架会跟进类似的后端模式吗?
Publication record
Featured in
#The briefings that carried this signal, newest first; the last row is the weekly review of its week. The tag is the section it ran in.
技术简报 - 2026-07-13
Worth trackingWeekly review · Jul 6 – Jul 12
Worth tracking
Sources