I see that pip whl comes with torch==2.7.0 pinned.
I wonder if I have to build from source to use it with 2.7.1 or maybe there is wheel somewhere or maybe I should not do it at all or simply reinstall torch to 2.7.1 after vllm installation.
You should not simply upgrade torch to 2.7.1 after installing the vLLM wheel, as vLLM’s pre-built wheels are compiled and tested only with the exact pinned torch version (2.7.0). Using a different torch version (like 2.7.1) with the wheel may cause binary incompatibility or runtime errors. There is no official vLLM wheel for torch 2.7.1 as of now, and the documentation does not mention support for it or provide such a wheel.
If you require torch 2.7.1, you must build vLLM from source in an environment where torch 2.7.1 is already installed, using the --no-build-isolation flag to ensure vLLM links against your existing torch installation. This is the only supported way to use vLLM with a non-pinned torch version, as described in the official build instructions. According to the docs, this process is necessary for custom or nightly torch builds and is the recommended approach for version mismatches.
Would you like step-by-step instructions for building vLLM from source with torch 2.7.1?
Sources: