update readme
This commit is contained in:
parent
80f44ba24e
commit
116302f3b5
23
README.md
23
README.md
|
|
@ -213,7 +213,6 @@ embedding_model_dict = {
|
||||||
```shell
|
```shell
|
||||||
$ python init_database.py
|
$ python init_database.py
|
||||||
```
|
```
|
||||||
|
|
||||||
- 如果您是第一次运行本项目,知识库尚未建立,或者配置文件中的知识库类型、嵌入模型发生变化,需要以下命令初始化或重建知识库:
|
- 如果您是第一次运行本项目,知识库尚未建立,或者配置文件中的知识库类型、嵌入模型发生变化,需要以下命令初始化或重建知识库:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
|
@ -243,11 +242,13 @@ $ python server/llm_api.py
|
||||||
```
|
```
|
||||||
|
|
||||||
项目支持多卡加载,需在 llm_api.py 中修改 create_model_worker_app 函数中,修改如下三个参数:
|
项目支持多卡加载,需在 llm_api.py 中修改 create_model_worker_app 函数中,修改如下三个参数:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
gpus=None,
|
gpus=None,
|
||||||
num_gpus=1,
|
num_gpus=1,
|
||||||
max_gpu_memory="20GiB"
|
max_gpu_memory="20GiB"
|
||||||
```
|
```
|
||||||
|
|
||||||
其中,`gpus` 控制使用的显卡的ID,如果 "0,1";
|
其中,`gpus` 控制使用的显卡的ID,如果 "0,1";
|
||||||
|
|
||||||
`num_gpus` 控制使用的卡数;
|
`num_gpus` 控制使用的卡数;
|
||||||
|
|
@ -342,14 +343,15 @@ $ streamlit run webui.py --server.port 666
|
||||||
- Web UI 对话界面:
|
- Web UI 对话界面:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
- Web UI 知识库管理页面:
|
- Web UI 知识库管理页面:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### 6 一键启动:
|
### 6 一键启动
|
||||||
|
|
||||||
|
**!!!注意,一键启动脚本仅适用于linux和mac设备!!!**
|
||||||
|
|
||||||
#### 6.1 api服务一键启动脚本
|
#### 6.1 api服务一键启动脚本
|
||||||
|
|
||||||
|
|
@ -372,30 +374,41 @@ $ python server/api_allinone.py --model-path-address model1@host1@port1 model2@h
|
||||||
```shell
|
```shell
|
||||||
python server/api_allinone.py --model-path-address model@host@port --num-gpus 2 --gpus 0,1 --max-gpu-memory 10GiB
|
python server/api_allinone.py --model-path-address model@host@port --num-gpus 2 --gpus 0,1 --max-gpu-memory 10GiB
|
||||||
```
|
```
|
||||||
|
|
||||||
其他参数详见各脚本及fastchat服务说明。
|
其他参数详见各脚本及fastchat服务说明。
|
||||||
|
|
||||||
#### 6.2 webui一键启动脚本
|
#### 6.2 webui一键启动脚本
|
||||||
|
|
||||||
加载本地模型:
|
加载本地模型:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ python webui_allinone.py
|
$ python webui_allinone.py
|
||||||
```
|
```
|
||||||
|
|
||||||
调用远程api服务:
|
调用远程api服务:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ python webui_allinone.py --use-remote-api
|
$ python webui_allinone.py --use-remote-api
|
||||||
```
|
```
|
||||||
|
|
||||||
后台运行webui服务:
|
后台运行webui服务:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ python webui_allinone.py --nohup
|
$ python webui_allinone.py --nohup
|
||||||
```
|
```
|
||||||
|
|
||||||
加载多个非默认模型:
|
加载多个非默认模型:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ python webui_allinone.py --model-path-address model1@host1@port1 model2@host2@port2
|
$ python webui_allinone.py --model-path-address model1@host1@port1 model2@host2@port2
|
||||||
```
|
```
|
||||||
|
|
||||||
多卡启动:
|
多卡启动:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ python webui_alline.py --model-path-address model@host@port --num-gpus 2 --gpus 0,1 --max-gpu-memory 10GiB
|
||||||
```
|
```
|
||||||
python webui_alline.py --model-path-address model@host@port --num-gpus 2 --gpus 0,1 --max-gpu-memory 10GiB
|
|
||||||
```
|
|
||||||
其他参数详见各脚本及fastchat服务说明。
|
其他参数详见各脚本及fastchat服务说明。
|
||||||
|
|
||||||
## 常见问题
|
## 常见问题
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue