Migrating vLLM to the LibTorch Stable ABI VLLM v0.33.0 now publishes LibTorch ABI Stable CUDA wheels, letting the same vLLM wheel run across compatible PyTorch releases without a rebuild or relink. The migration relied on the stable C shim, C++ wrappers and torch::headeronly utilities, and used the torch_call_dispatcher C shim to call ATen ops such as is_pinned() in an ABI-stable way; PyTorch 2.14 subsequently added a stable C++ is_pinned() method. The vLLM team reports no noticeable runtime regression, though it notes the stable ABI covers only a subset of LibTorch and adds small host-side type-conversion and dispatcher overhead that is negligible under CUDA Graphs. Migrating vLLM to the LibTorch Stable ABI Introduction vLLM relies heavily on PyTorch, with frequent calls to LibTorch in its C++ backend. As a result, changes to LibTorch’s binary interface may require vLLM to be rebuilt and relinked, even when the APIs remain unchanged. What if we could update LibTorch without rebuilding vLLM? That’s where the LibTorch Stable ABI comes in. With a LibTorch Stable ABI, updating LibTorch does not require rebuilding or updating vLLM in order to keep using it. Instead, we could swap out the torch wheel and import it directly into our vLLM package. As of v0.33.0, vLLM publishes LibTorch ABI Stable CUDA wheels. Note: Compatibility between vLLM and PyTorch still depends on other factors, including Python APIs, GPU-related requirements such as the minimum supported CUDA version , and third-party dependencies. The LibTorch Stable ABI addresses binary compatibility but does not eliminate these other constraints. What Is the LibTorch Stable ABI? An application binary interface ABI defines how compiled code interacts with a library: how functions are called, data is laid out, and symbols are named. Even if an API looks the same in source code, an ABI change can force extensions to rebuild. A stable ABI preserves a supported set of binary interfaces across compatible versions, so extensions that use them can keep working without a rebuild. PyTorch’s LibTorch Stable ABI has three layers: a stable C shim exposing selected LibTorch APIs, C++ wrappers that make the shim easier to use, and headeronly utilities in torch::headeronly that do not link against libtorch.so . Why Stable ABI Matters Before the Stable ABI, a new PyTorch release could require a vLLM rebuild, delaying support for the new version and its features. With the Stable ABI, the same vLLM wheel can work across compatible PyTorch releases, letting users upgrade sooner and reducing rebuilds for package distributors. For developers, this means you can update and rebuild PyTorch, then test those changes in vLLM without rebuilding vLLM. Tradeoffs The LibTorch Stable ABI is a limited subset of all of LibTorch. While many common ops are already supported through the C shim and through the higher level C++ convenience wrappers, not all are. For example, is pinned lacked a stable equivalent during the migration. Thankfully, there is a general-purpose torch call dispatcher C shim that allows us to call ATen ops through the dispatcher in an ABI stable manner This let us maintain behavior and achieve ABI stability at the same time. This migration also helped inform PyTorch which APIs were commonly used, and in version 2.14 they added a stable C++ is pinned method. Before: direct LibTorch method call if cpu tensor.is pinned After: ABI stable dispatcher call std::array