vllm-project/afd-plugin
A vLLM plugin that separates Attention and FFN for independent worker placement
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
AFD is an external vLLM plugin that splits Attention and feed-forward (FFN) execution across worker roles. It loads through vLLM's general-plugin entry point without requiring changes to the vLLM source tree. Clients send inference requests to Attention; FFN workers serve work delivered through the configured connector. Role and topology configuration enters through --additional-config rather than a separate client API for FFN.
The plugin owns workers, model runners, model wrappers, connectors, configuration validation, and compatibility shims. The Python package, vllm-afd-plugin, targets Python 3.11 through 3.13; its setuptools build declares wheel, setuptools-scm, pybind11, and CMake 3.16 or later, with native backend code under csrc/. v0.30.0rc1 completed the ModelRunnerV2 transition on CUDA and Ascend. The extension boundary avoids maintaining a source fork, but the runner integration remains tied to the vLLM runtime contract.
Key Capabilities & Differentiators
The core capability is separate placement of Attention and FFN ranks rather than keeping both stages colocated. On GPU, v0.32.0rc1 introduced expert-routed M:N communication: DeepEPM2NAFDConnector uses afdEP-comm to send tokens directly from M Attention ranks to the FFN ranks among N that own the selected experts. This is a specific expert-routing path, not evidence that every model or connector supports the same topology.
The plugin has CUDA GPU and Ascend NPU backends. v0.34.0rc1 expands GPU M:N transports, standalone FFN services, and Ascend A3/A5 execution paths. Use docs/support.md to select a tested model, connector, and configuration before choosing a recipe; it also identifies known accuracy and shutdown limitations. Hardware-gated integration tests are relevant to that choice, but support for one combination should not be extrapolated to another.
Trade-offs & Limitations
Compared with standard colocated vLLM, AFD gives operators an explicit way to choose Attention and FFN placement and capacity separately. The cost is a cross-rank communication path on top of model execution, plus more topology and lifecycle decisions. Without a bottleneck that separate placement actually relieves, that extra complexity may offer no advantage over keeping the stages together.
Treat the plugin as experimental. The adoption test is a controlled comparison against colocated vLLM using the same model and workload: measure per-role memory peaks, throughput, tail latency, output correctness, and startup and shutdown behavior on the intended backend. Do not infer a gain from M:N support alone. Apache-2.0 applies to the plugin package; redistribution should also account for the separately listed CANN kernel license file and the terms of any bundled runtime or model artifacts.
Hardware & Deployment Guide
For self-hosting, select a supported model and connector in docs/support.md, follow the CUDA or Ascend installation path in docs/installation.md, and use the matching recipe under recipe/. The package requires Python >=3.11,<3.14; source builds declare setuptools, wheel, setuptools-scm, pybind11, and CMake. Pass roles and topology via --additional-config, direct client requests to Attention, and validate both role paths on the intended accelerators.
Pin the plugin and runtime together. The supplied release milestones track vLLM 0.30.0, 0.32.0, and 0.34.0; for v0.34.0rc1 specifically, the Ascend pairing is vLLM-Ascend 7dcdb690 with CANN 9.3.0. CPU-only or macOS environments support development checks such as uv run pytest and uv run ruff check ., not hardware acceptance. Use the hardware E2E path under tests/e2e/ and verify model correctness, startup, and shutdown on the chosen configuration before rollout.
--additional-config sets roles and topology.DeepEPM2NAFDConnector uses afdEP-comm to deliver tokens directly to the FFN ranks that own their selected experts.Inference teams with CUDA or Ascend capacity, a tested model–connector pairing, and a measured reason to provision Attention and FFN separately.
Standard colocated vLLM already meets service targets, you need a turnkey production deployment, or you cannot validate correctness and lifecycle behavior on the target topology.
Quick Start & Installation
uv run pytest uv run ruff check .
Comparison vs. Top LLMs & Inference Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| afd-plugin ★ | 256 | — | C++ | Apache-2.0 | A vLLM plugin that separates Attention and FFN for independent worker placement |
| minimind | 75.4k | +3.1k | Python | Apache-2.0 | Native PyTorch dense and MoE models for end-to-end LLM training on local GPUs |
| autoresearch | 101k | +342 | Python | — | Single-GPU nanochat harness for agent-led, five-minute training experiments |
| LlamaFactory | 76.4k | +86 | Python | Apache-2.0 | A unified Python framework for LLM and VLM fine-tuning with pluggable inference |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/vllm-project/afd-plugin.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about afd-plugin
How does the plugin integrate with vLLM, and where do clients send requests?
--additional-config, send inference requests to Attention, and let FFN workers serve the work delivered by the selected connector.How should we size accelerator memory and estimate runtime overhead?
Can we self-host it commercially or redistribute a container image?
csrc/npu/ascend_kernels/LICENSE-CANN as a license file. Before redistributing a build or image, review the bundled components and their notices separately, along with the terms for the accelerator runtime and model weights you ship.When should we choose AFD over standard colocated vLLM?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy