docs(vllm_guide): let vLLM pin torch/torchaudio in the installation steps#3009
Conversation
let vLLM pin torch/torchaudio in the installation steps
Updated installation instructions for vLLM, including specific pip install commands based on CUDA version and clarifying dependencies.
Clarified installation instructions for vLLM and dependencies, emphasizing the importance of matching CUDA versions and avoiding manual installation of PyTorch components.
There was a problem hiding this comment.
Code Review
This pull request updates the installation guides (docs/vllm_guide.md, docs/vllm_guide_zh.md, and docs/vllm_guide_zh_v2.md) to clarify that vLLM should be installed first to automatically manage the matching, ABI-locked PyTorch, torchaudio, and torchvision dependencies, which helps prevent CUDA driver mismatch errors. The review feedback highlights two issues: the English guide accidentally omitted several required dependencies (such as safetensors and fastapi) that remain in the Chinese versions, and a markdown code block in the Chinese guide is missing the bash language identifier, which breaks syntax highlighting.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| pip install "vllm==0.19.1" # adjust to your driver CUDA; see note below | ||
|
|
||
| # 2) Then FunASR and the rest. | ||
| pip install funasr>=1.3.0 |
There was a problem hiding this comment.
在英文版指南中,移除了 safetensors tiktoken websockets regex fastapi uvicorn python-multipart 的安装步骤,但这与中文版指南(vllm_guide_zh.md 和 vllm_guide_zh_v2.md)不一致。这些依赖项对于后续章节中介绍的 vLLM 服务(如 serve_vllm.py 和 serve_realtime_ws.py)是必需的。建议在英文版中也保留这些依赖的安装。
| pip install funasr>=1.3.0 | |
| pip install funasr>=1.3.0 | |
| pip install safetensors tiktoken websockets regex fastapi uvicorn python-multipart |
| ```bash | ||
| 先安装 vLLM,按 NVIDIA 驱动的 CUDA 版本选对应版本;vLLM 会自动钉定并安装匹配的 torch / torchaudio / torchvision 三件套,所以不要自己装 torch/torchaudio——三者 ABI 锁死,必须是互相编译匹配的同一组(如 torch 2.10.0 ↔ torchaudio 2.10.0 ↔ torchvision 0.25.0),只能随 vLLM 一起来。 | ||
|
|
||
| ``` |
对应 #3006 第 2 点。安装步骤去掉手动 pip install torch torchaudio,改为「按 nvidia-smi 的 CUDA 版本选 vLLM → 由 vLLM 钉定匹配的 torch/torchaudio/torchvision」,并说明三者 ABI 锁死、不应单独安装(附 vLLM requirements/cuda.txt 链接)。en / zh / zh_v2 三份同步修改。
多个 commit,合并时可 squash。