feat(model): Support vLLM

This commit is contained in:
FangYin Cheng
2023-10-09 20:01:29 +08:00
parent 1cdaaeb820
commit d5a52f79f1
32 changed files with 957 additions and 155 deletions

View File

@@ -47,7 +47,7 @@ You can execute the command `bash docker/build_all_images.sh --help` to see more
**Run with local model and SQLite database**
```bash
docker run --gpus all -d \
docker run --ipc host --gpus all -d \
-p 5000:5000 \
-e LOCAL_DB_TYPE=sqlite \
-e LOCAL_DB_PATH=data/default_sqlite.db \
@@ -73,7 +73,7 @@ docker logs dbgpt -f
**Run with local model and MySQL database**
```bash
docker run --gpus all -d -p 3306:3306 \
docker run --ipc host --gpus all -d -p 3306:3306 \
-p 5000:5000 \
-e LOCAL_DB_HOST=127.0.0.1 \
-e LOCAL_DB_PASSWORD=aa123456 \

View File

@@ -30,3 +30,4 @@ Multi LLMs Support, Supports multiple large language models, currently supportin
./llama/llama_cpp.md
./quantization/quantization.md
./vllm/vllm.md

View File

@@ -0,0 +1,26 @@
vLLM
==================================
[vLLM](https://github.com/vllm-project/vllm) is a fast and easy-to-use library for LLM inference and serving.
## Running vLLM
### Installing Dependencies
vLLM is an optional dependency in DB-GPT, and you can manually install it using the following command:
```bash
pip install -e ".[vllm]"
```
### Modifying the Configuration File
Next, you can directly modify your `.env` file to enable vllm.
```env
LLM_MODEL=vicuna-13b-v1.5
MODEL_TYPE=vllm
```
You can view the models supported by vLLM [here](https://vllm.readthedocs.io/en/latest/models/supported_models.html#supported-models)
Then you can run it according to [Run](https://db-gpt.readthedocs.io/en/latest/getting_started/install/deploy/deploy.html#run).