Tool · 2026-07-08

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.

Hugging Face Blog2026-07-08About 2 min readWorth tracking

Marked as a signal by the editors; worth tracking.

Inference & deploymentWorkflow
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)。

At your level

Have AI explain this signal at your level

Pick your level of experience and AI writes an explanation for it on the spot.

Audience

Who should care

#
跟进新模型架构的推理工程师维护自有模型实现的模型作者评估推理框架选型的平台团队
Areas it may affect
新模型的上线周期推理框架选型开源建模库生态分工

Next

Learning path

#
  1. 理解建模库与推理引擎的分工:模型实现、执行优化分别在哪一层
  2. 用 --model-impl transformers 与原生实现各跑一次相同负载,对比吞吐
  3. 跟踪线性注意力等尚未支持的架构类型的进展

Getting started

Have AI draft a learning path

From the related knowledge and skills on this page, AI drafts a path from the basics to applying it.

Network

Where it sits in the network

#

How this signal connects to neighbouring technologies, skills and background knowledge. Follow any link to keep exploring.

Comparison

Compare with another technology

Pick another published technology and AI writes a comparison of what they share, how they differ and when to use each.

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.

Sources

Hugging Face Blog

Hugging FaceStartup2026-07-08
Open original sourcehttps://huggingface.co/blog/native-speed-vllm-transformers-backend