本人项目地址大全:Victor94-king/NLP__ManVictor: 优快云 of ManVictor
官方文档: Welcome to vLLM! — vLLM
项目地址: vllm-project/vllm: A high-throughput and memory-efficient inference and serving engine for LLMs
写在前面: 笔者更新不易,希望走过路过点个关注和赞,笔芯!!!
写在前面: 笔者更新不易,希望走过路过点个关注和赞,笔芯!!!
写在前面: 笔者更新不易,希望走过路过点个关注和赞,笔芯!!!
VLLM和TGI一样也是大模型部署应用非常广泛的一个库,下面我以蓝耘平台为例,教学一次Vllm的使用,大家可以选择相似的云平台作为使用。
- 系统: Linux
- python: 3.8 - 3.12
- GPU: Nvidia - 4090
- Cuda: 12.1
1. VLLM安装
-
用实例,这里我选择了个CUDA12.1.1 + Ubuntu22.04的系统,进去可以nvcc -V查看下cuda版本是否一致
-
使用pip方法安装vLLM,记得配置下镜像源
# (Recommended) Create a new conda environment. conda create -n myenv python=3.10 -y conda activate myenv # Install vLLM with CUDA 12.1. pip install vllm
另外,如果你使用的也是蓝耘云,利用conda切换环境的时候会可能会遇到conda init 错误。蓝耘里conda init 有点问题,在.bashrc里把下面这一段配置文件加进去,然后再
source ~/.bashrc
就可以配置环境了
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup=