Commit 367708c7 authored by zhuwenwen's avatar zhuwenwen
Browse files

update readme

parent 3472235c
# <div align="center"><strong>vLLM</strong></div> # <div align="center"><strong>vLLM</strong></div>
## 简介 ## 简介
vLLM是一个快速且易于使用的LLM推理和服务库使用PageAttention高效管理kv内存Continuous batching传入请求支持很多Hugging Face模型如LLaMA & LLaMA-2、Qwen、Chatglm2 & Chatglm3等。 vLLM是一个快速且易于使用的LLM推理和服务库,使用PageAttention高效管理kv内存,Continuous batching传入请求,支持很多Hugging Face模型,如LLaMA & LLaMA-2、Qwen、Chatglm2 & Chatglm3等。
## 暂不支持的官方功能 ## 暂不支持的官方功能
- **量化推理**目前支持fp16的推理和gptq,awq-int4推理mralin的权重量化、kv-cache fp8推理方案暂不支持 - **量化推理**:目前支持fp16的推理和gptq,awq-int4推理,mralin的权重量化、kv-cache fp8推理方案暂不支持
- **模块支持**目前不支持Sliding window attention - **模块支持**:目前不支持Sliding window attention
## 支持模型结构列表 ## 支持模型结构列表
| 结构 | 模型 | 模型并行 | FP16 | | 结构 | 模型 | 模型并行 | FP16 |
| :------: | :------: | :------: | :------: | | :------: | :------: | :------: | :------: |
| LlamaForCausalLM | Llama 3.1Llama 3Llama 2LlamaYiCodellama、deepseek | Yes | Yes | | LlamaForCausalLM | Llama 3.1,Llama 3,Llama 2,Llama,Yi,Codellama、deepseek | Yes | Yes |
| QWenLMHeadModel | QWenQwen-VL | Yes | Yes | | QWenLMHeadModel | QWen,Qwen-VL | Yes | Yes |
| Qwen2ForCausalLM | QWen2QWen1.5CodeQwen1.5 | Yes | Yes | | Qwen2ForCausalLM | QWen2,QWen1.5,CodeQwen1.5 | Yes | Yes |
| ChatGLMModel | glm-4v-9bchatglm3chatglm2 | Yes | Yes | | ChatGLMModel | glm-4v-9b,chatglm3,chatglm2 | Yes | Yes |
| DeepseekV2ForCausalLM | DeepSeek-V2 | Yes | Yes | | DeepseekV2ForCausalLM | DeepSeek-V2 | Yes | Yes |
| BaiChuanForCausalLM | Baichuan2Baichuan | Yes | Yes | | BaiChuanForCausalLM | Baichuan2,Baichuan | Yes | Yes |
| BloomForCausalLM | BLOOM | Yes | Yes | | BloomForCausalLM | BLOOM | Yes | Yes |
| InternLMForCausalLM | InternLM | Yes | Yes | | InternLMForCausalLM | InternLM | Yes | Yes |
| InternLM2ForCausalLM | InternLM2 | Yes | Yes | | InternLM2ForCausalLM | InternLM2 | Yes | Yes |
| MiniCPMForCausalLM | MiniCPM | Yes | Yes | | MiniCPMForCausalLM | MiniCPM | Yes | Yes |
| MiniCPM3ForCausalLM | MiniCPM3 | Yes | Yes | | MiniCPM3ForCausalLM | MiniCPM3 | Yes | Yes |
| MixtralForCausalLM | Mixtral-8x7BMixtral-8x7B-Instruct | Yes | Yes | | MixtralForCausalLM | Mixtral-8x7B,Mixtral-8x7B-Instruct | Yes | Yes |
| TeleChat12BForCausalLM (#TelechatForCausalLM) | TeleChat-12B | Yes | Yes | | TeleChat12BForCausalLM (#TelechatForCausalLM) | TeleChat-12B | Yes | Yes |
| LlavaForConditionalGeneration | LLaMALLaMA-2LLaMA-3 | Yes | Yes | | LlavaForConditionalGeneration | LLaMA,LLaMA-2,LLaMA-3 | Yes | Yes |
| Qwen2VLForConditionalGeneration | Qwen2-VL | Yes | Yes | | Qwen2VLForConditionalGeneration | Qwen2-VL | Yes | Yes |
| MiniCPMV | MiniCPM-V | Yes | Yes | | MiniCPMV | MiniCPM-V | Yes | Yes |
| Phi3VForCausalLM | Phi-3.5-vision | Yes | Yes | | Phi3VForCausalLM | Phi-3.5-vision | Yes | Yes |
...@@ -39,11 +39,11 @@ vLLM支持 ...@@ -39,11 +39,11 @@ vLLM支持
### 使用源码编译方式安装 ### 使用源码编译方式安装
#### 编译环境准备 #### 编译环境准备
提供2种环境准备方式 提供2种环境准备方式:
1. 基于光源pytorch2.3.0基础镜像环境镜像下载地址[https://sourcefind.cn/#/image/dcu/pytorch](https://sourcefind.cn/#/image/dcu/pytorch)根据pytorch2.1.0、python、dtk及系统下载对应的镜像版本。 1. 基于光源pytorch2.3.0基础镜像环境:镜像下载地址:[https://sourcefind.cn/#/image/dcu/pytorch](https://sourcefind.cn/#/image/dcu/pytorch),根据pytorch2.1.0、python、dtk及系统下载对应的镜像版本。
2. 基于现有python环境安装pytorch2.3.0pytorch whl包下载目录[https://cancon.hpccube.com:65024/4/main/pytorch](https://cancon.hpccube.com:65024/4/main/pytorch)根据python、dtk版本,下载对应pytorch2.1.0的whl包。安装命令如下 2. 基于现有python环境:安装pytorch2.3.0,pytorch whl包下载目录:[https://cancon.hpccube.com:65024/4/main/pytorch](https://cancon.hpccube.com:65024/4/main/pytorch),根据python、dtk版本,下载对应pytorch2.1.0的whl包。安装命令如下:
```shell ```shell
pip install torch* (下载的torch的whl包) pip install torch* (下载的torch的whl包)
pip install setuptools wheel pip install setuptools wheel
...@@ -53,11 +53,11 @@ pip install setuptools wheel ...@@ -53,11 +53,11 @@ pip install setuptools wheel
```shell ```shell
git clone http://developer.hpccube.com/codes/OpenDAS/vllm.git # 根据需要的分支进行切换 git clone http://developer.hpccube.com/codes/OpenDAS/vllm.git # 根据需要的分支进行切换
``` ```
安装依赖 安装依赖:
```shell ```shell
pip install -r requirements-rocm.txt pip install -r requirements-rocm.txt
``` ```
- 提供2种源码编译方式进入vllm目录): - 提供2种源码编译方式(进入vllm目录):
``` ```
1. 编译whl包并安装 1. 编译whl包并安装
VLLM_INSTALL_PUNICA_KERNELS=1 python setup.py bdist_wheel VLLM_INSTALL_PUNICA_KERNELS=1 python setup.py bdist_wheel
...@@ -71,17 +71,17 @@ VLLM_INSTALL_PUNICA_KERNELS=1 python3 setup.py install ...@@ -71,17 +71,17 @@ VLLM_INSTALL_PUNICA_KERNELS=1 python3 setup.py install
#### 运行基础环境准备 #### 运行基础环境准备
1、使用上面基于光源pytorch2.3.0基础镜像环境 1、使用上面基于光源pytorch2.3.0基础镜像环境
2、根据pytorch2.3.0、python、dtk及系统下载对应的依赖包 2、根据pytorch2.3.0、python、dtk及系统下载对应的依赖包:
- triton:[https://cancon.hpccube.com:65024/4/main/triton](https://cancon.hpccube.com:65024/4/main/triton/) - triton:[https://cancon.hpccube.com:65024/4/main/triton](https://cancon.hpccube.com:65024/4/main/triton/)
- xformers:[https://cancon.hpccube.com:65024/4/main/xformers](https://cancon.hpccube.com:65024/4/main/xformers) - xformers:[https://cancon.hpccube.com:65024/4/main/xformers](https://cancon.hpccube.com:65024/4/main/xformers)
- flash_attn: [https://cancon.hpccube.com:65024/4/main/flash_attn](https://cancon.hpccube.com:65024/4/main/flash_attn) - flash_attn: [https://cancon.hpccube.com:65024/4/main/flash_attn](https://cancon.hpccube.com:65024/4/main/flash_attn)
- lmslim: [https://cancon.hpccube.com:65024/4/main/lmslim](https://cancon.hpccube.com:65024/4/main/lmslim) - lmslim: [https://cancon.hpccube.com:65024/4/main/lmslim](https://cancon.hpccube.com:65024/4/main/lmslim)
#### 注意事项 #### 注意事项
+ 若使用 pip install 下载安装过慢可添加源-i https://pypi.tuna.tsinghua.edu.cn/simple/ + 若使用 pip install 下载安装过慢,可添加源:-i https://pypi.tuna.tsinghua.edu.cn/simple/
## 验证 ## 验证
- python -c "import vllm; print(vllm.\_\_version__)"版本号与官方版本同步查询该软件的版本号例如0.6.2 - python -c "import vllm; print(vllm.\_\_version__)",版本号与官方版本同步,查询该软件的版本号,例如0.6.2;
## Known Issue ## Known Issue
- -
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment