vllm 2080TI ubuntu环境安装
#@TOC
欢迎使用Markdown编辑器安装gcc 9
sudo add-apt-repository ppa:ubuntu-toolchain-r/testsudo apt-get install gcc-9 g++-9sudo apt-get install gcc-9 g++-9sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90 --slave /usr/bin/g++ g++ /usr/bin/g++-9gcc -v
安装 transformer
cuda118环境安装
flash_attn安装
下载地址
https://github.com/Dao-AILab/flash-attention/releases
pip install flash_attn-2.7.3+cu11torch2.1cxx11abiFALSE-cp310-cp310-linux_x86_64.whl
torch 安装(vllm 会自动安装)
版本地址:https://pytorch.org/get-started/previous-versions/
pip install torch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 --index-url https://download.pytorch.org/whl/cu118
xformers 安装,不安装 后续安装会很卡
pip3 install -U xformers --index-url https://download.pytorch.org/whl/cu121 # cuda12.1 版本
pip3 install -U xformers==0.0.23.post1+cu118 --index-url https://download.pytorch.org/whl/cu118 # cuda 11.8版本
vllm 安装
在 linux 系统对应python 环境执行
cuda11.8
export VLLM_VERSION=0.6.1.post1
export PYTHON_VERSION=310
pip install https://github.com/vllm-project/vllm/releases/download/v${VLLM_VERSION}/vllm-${VLLM_VERSION}+cu118-cp${PYTHON_VERSION}-cp${PYTHON_VERSION}-manylinux1_x86_64.whl --extra-index-url https://download.pytorch.org/whl/cu118