---
title: "Native-speed vLLM transformers modeling backend"
description: "The transformers modeling backend in vLLM now matches or beats vLLM's hand-written native implementations in throughput."
url: "https://swe.quest/articles/native-speed-vllm-transformers-modeling-backend-cb3f698fe9046ce3"
canonical: "https://huggingface.co/blog/native-speed-vllm-transformers-backend"
source: "Hugging Face"
published: "2026-07-08"
difficulty: "hard"
kind: "Announcement"
reading_minutes: 5
tags: ["inference","llms","performance","python"]
---

# Native-speed vLLM transformers modeling backend

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2026-07-08, 5 min read, Announcement. Original: [https://huggingface.co/blog/native-speed-vllm-transformers-backend](https://huggingface.co/blog/native-speed-vllm-transformers-backend)

## Summary

The transformers modeling backend in vLLM now matches or beats vLLM's hand-written native implementations in throughput. Benchmarks covered Qwen3-4B on one GPU, Qwen3-32B with tensor parallelism, and Qwen3-235B FP8 MoE with data and expert parallelism on 8×H100. The backend uses torch.fx static analysis to find known patterns, then rewrites the model source via AST to swap in fused vLLM kernels such as QKVParallelLinear, MergedColumnParallelLinear and expert-parallel MoE ops. It also infers TP/PP plans while staying compatible with torch.compile and CUDA Graphs. Any compliant transformers model gets this with \`--model-impl transformers\`, except linear-attention models and custom Hub-code models.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [Inference & serving](https://swe.quest/tags/inference.md) (AI & ML)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [Python](https://swe.quest/tags/python.md) (Languages)

## Prerequisites

- LLM inference serving ([easy posts on Inference & serving](https://swe.quest/tags/inference.md?difficulty=easy))
- tensor and expert parallelism ([easy posts on Concurrency](https://swe.quest/tags/concurrency.md?difficulty=easy))
- PyTorch

## Keywords

vLLM, Hugging Face Transformers, torch.fx, torch.compile, Qwen3, Mixture-of-Experts, CUDA Graphs

## Related posts

- [180B Parameters, 32GB of RAM: Pushing MoE Inference to the Limit with Transformers](https://swe.quest/articles/180b-parameters-32gb-of-ram-pushing-moe-inference-to-the-limit-with-transformers-63cd3cf21432f7c3.md): Hugging Face · 2026-11-18 · Hard · 11 min read · Inference & serving, LLMs, Performance engineering, Caching, Hardware
  Streaming MoE experts from SSD through a bounded device-side slot pool lets Transformers run Qwen3.8-Flash-Next (121 GB of experts) on a 32 GB MacBook M5 at ~13.9 tok/s, within 6% of the specialized Strata engine on decode and slightly faster on prefill.
- [Mixture of Experts (MoEs) in Transformers](https://swe.quest/articles/mixture-of-experts-moes-in-transformers-670e279baa41a80a.md): Hugging Face · 2026-02-26 · Hard · 10 min read · Inference & serving, LLMs, Model training, Performance engineering, Python
  Hugging Face transformers v5 reworks its internals to treat Mixture of Experts models as first-class: a WeightConverter pipeline packs per-expert checkpoint tensors into contiguous runtime tensors with async, lazy materialization, cutting Qwen1.5-110B load time from ~66s to ~21s (10s with tensor parallelism) on an A100.
- [Transformers now runs llama.cpp quants](https://swe.quest/articles/transformers-now-runs-llama-cpp-quants-cff2353854049dc6.md): Hugging Face · 2026-09-22 · Medium · 11 min read · Inference & serving, LLMs, Python, Performance engineering
  Hugging Face transformers can now load GGUF (llama.cpp) quantized checkpoints via \`from\_pretrained(..., gguf\_file=...)\` and serve them through \`transformers serve\` with an OpenAI-compatible API.
- [Tricks from OpenAI gpt-oss YOU 🫵 can use with transformers](https://swe.quest/articles/tricks-from-openai-gpt-oss-you-can-use-with-transformers-aad70bf42c0bd3ff.md): Hugging Face · 2025-09-11 · Hard · 15 min read · Inference & serving, LLMs, Python, Performance engineering
  Hugging Face upgraded transformers to support OpenAI's gpt-oss models, and most of the new features carry over to other models.
- [Accelerating Transformers Fine-Tuning with NVIDIA NeMo AutoModel](https://swe.quest/articles/accelerating-transformers-fine-tuning-with-nvidia-nemo-automodel-c196d721b8de0a9a.md): Hugging Face · 2026-06-24 · Hard · 10 min read · Model training, Performance engineering, LLMs, Python
  NeMo AutoModel subclasses Transformers v5's AutoModelForCausalLM and adds Expert Parallelism as a dedicated mesh orthogonal to data parallelism, DeepEP fused all-to-all dispatch, and TransformerEngine kernels.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
