--- title: How a Transformers Model Loads in vLLM emoji: ๐Ÿง  colorFrom: indigo colorTo: purple sdk: static app_file: index.html pinned: false license: apache-2.0 short_description: Animated walkthrough of vLLM's Transformers modeling backend --- # How a Transformers model loads (and runs) in vLLM An animated, self-contained walkthrough โ€” built to present at conferences โ€” of what happens when you `vllm serve Qwen/Qwen3-VL-30B-A3B-Instruct-FP8 --model-impl transformers` **using the Transformers modeling backend**. It follows the control flow from the CLI, through backend-class resolution and the MRO, into `Base.__init__` rebuilding the model, and then sends a batch through โ€” watching execution hop back and forth across the **vLLM โ‡„ Transformers** boundary at the attention and MoE seams. Qwen3-VL-FP8 (a multimodal, FP8-quantized MoE) is used because it exercises more of the backend than a plain text model: the multimodal path (`TransformersMultiModalMoEForCausalLM` + vision tower + M-RoPE), FP8 quantization through `SupportsQuant`, pipeline-parallel deletions (the `Base.__init__` walk-through is shown at PP=2), the fuser system (QKV / RMSNorm / MoE), and the fact that a native vLLM implementation exists, so the backend must be explicitly requested. ## Running it It's a single `index.html` with **no CDN and no build step** โ€” the only other files live in `assets/`: the vendored brand logos (official [vLLM media-kit](https://github.com/vllm-project/media-kit) and [Hugging Face brand](https://huggingface.co/brand) SVGs) and `deck-qr.svg`, a pre-rendered QR code for this Space shown on the title slide. Just open it: ```bash open index.html # macOS # or serve it: python3 -m http.server # then visit http://localhost:8000 ``` ## Controls - `โ†’` / `Space` โ€” next beat ยท `โ†` โ€” previous ยท click right/left of screen - Every animation is **manual**: each `โ†’` advances one sub-step (assembling the MRO, walking `Base.__init__`, stepping the attention/MoE hops), then moves to the next beat - `Home` / `End` โ€” jump to first / last ยท `f` โ€” fullscreen - `#N` deep-links to beat N (e.g. `โ€ฆ/#10`); `#N.M` deep-links to sub-step M of beat N (e.g. `โ€ฆ/#8.9`) ## Accuracy Every class name and method is taken from the vLLM source (`vllm/model_executor/models/transformers/`, `vllm/config/model.py`, `vllm/model_executor/models/registry.py`), last checked against `main` on 2026-11-12. Captions name the **file and symbol** rather than a line number, deliberately โ€” line numbers go stale within days and the symbol is what you'd actually grep for. Code panels show lightly trimmed excerpts (error handling and the Eagle3 / MLA branches are elided), so their gutter numbers are excerpt-relative, not file lines. The Qwen3-VL-30B-A3B numbers reflect the real A3B text backbone (48 layers, 128 experts, top-8), not the placeholder config defaults.