Skip to content

Commit 42ff1e6

Browse files
author
xusenlin
committed
Setting up issue template
1 parent aafaaf9 commit 42ff1e6

File tree

3 files changed

+149
-0
lines changed

3 files changed

+149
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: 中文提问模板
2+
description: 与本项目相关的问题提问,我们会优先查阅内容相对完整的issue。
3+
4+
body:
5+
- type: checkboxes
6+
id: mustchecks
7+
attributes:
8+
label: 提交前必须检查以下项目
9+
description: 请在提问前检查以下项目,善用搜索功能查找与自己问题相关的issue。
10+
options:
11+
- label: 请确保使用的是仓库最新代码(git pull),一些问题已被解决和修复。
12+
required: true
13+
- label: 我已阅读[项目文档](https://github.com/xusenlinzy/api-for-open-llm/blob/master/README.md)和[FAQ章节](https://github.com/xusenlinzy/api-for-open-llm/blob/master/docs/FAQ.md)并且已在Issue中对问题进行了搜索,没有找到相似问题和解决方案
14+
required: true
15+
- type: dropdown
16+
id: question-type
17+
attributes:
18+
label: 问题类型
19+
description: 请选择最符合的问题类型
20+
options:
21+
- 安装环境
22+
- 启动命令
23+
- 模型推理和部署
24+
- 效果问题
25+
- 其他问题
26+
- type: dropdown
27+
id: model-type
28+
attributes:
29+
label: 基础模型
30+
description: 请提供问题涉及的具体模型。
31+
- type: dropdown
32+
id: operating-system
33+
attributes:
34+
label: 操作系统
35+
description: 请提供操作系统类型
36+
options:
37+
- Windows
38+
- macOS
39+
- Linux
40+
- type: textarea
41+
id: question-detailed
42+
attributes:
43+
label: 详细描述问题
44+
description: 请尽量具体地描述遇到的问题,**代码程序类问题务必给出完整运行命令**,这将有助于快速定位问题所在。
45+
value: |
46+
```
47+
# 请在此处粘贴运行代码(如没有可删除该代码块)
48+
```
49+
- type: textarea
50+
id: dependencies
51+
attributes:
52+
label: 依赖情况(代码类问题务必提供)
53+
description: 请提供transformers, peft, torch等常规依赖库的版本:`pip list | grep -E 'transformers|peft|torch'`
54+
value: |
55+
```
56+
# 请在此处粘贴依赖情况
57+
```
58+
- type: textarea
59+
id: logs
60+
attributes:
61+
label: 运行日志或截图
62+
description: 请优先提供文本形式的log(过长内容请上传文件),粘贴内容放在markdown代码块。或者提供截图形式的运行记录。
63+
value: |
64+
```
65+
# 请在此处粘贴运行日志
66+
```

.github/ISSUE_TEMPLATE/config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false

docs/FAQ.md

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# FAQ
2+
3+
## 安装&环境
4+
5+
### docker 环境
6+
7+
构建镜像的命令为
8+
9+
```shell
10+
docker build -f docker/Dockerfile -t llm-api:pytorch .
11+
```
12+
13+
如果想要提高推理效率和处理并发请求,推荐使用 [vLLM](https://github.com/vllm-project/vllm)
14+
15+
构建镜像的命令为
16+
17+
```shell
18+
docker build -f docker/Dockerfile.vllm -t llm-api:vllm .
19+
```
20+
21+
### 本地环境
22+
23+
**`vLLM` 环境需要将 `torch` 版本升级到 `2.0.0` 以上,再安装 `vllm`**
24+
25+
```shell
26+
pip install -r requirements.txt
27+
pip install torch -U
28+
pip install git+https://github.com/vllm-project/vllm.git
29+
```
30+
31+
如不需要安装 `vLLM`,则只需要
32+
33+
```shell
34+
pip install torch==1.14
35+
pip install -r requirements.txt
36+
```
37+
38+
## 模型启动命令
39+
40+
### 不使用 vllm
41+
42+
模型启动命令及参数含义见 [script](./SCRIPT.md)
43+
44+
### 使用 vllm
45+
46+
模型启动命令及参数含义见 [vllm_script](./VLLM_SCRIPT.md)
47+
48+
### 模型挂载
49+
50+
如果使用 `docker` 方式启动模型,且模型权重不在该项目下,需要将模型权重挂载到容器中,添加如下命令
51+
52+
```shell
53+
-v {local_model_path}:/workspace/{container_model_path}
54+
```
55+
56+
## 接口调用方式
57+
58+
### 可用的接口
59+
60+
+ `/v1/models`: 查询模型信息
61+
62+
63+
+ `/v1/chat/completions`: 聊天
64+
65+
66+
+ `/v1/completions`: 文字接龙
67+
68+
69+
+ `/v1/embeddings`: 句子嵌入
70+
71+
72+
具体使用方式兼容 [openai](https://github.com/openai/openai-python)
73+
74+
### 接入其他 `web` 项目
75+
76+
接入到其他基于 `chatgpt` 的前后端项目,只需要修改环境变量
77+
78+
79+
+ `OPENAI_API_KEY`: 此处随意填一个字符串即可
80+
81+
82+
+ `OPENAI_API_BASE`: 后端启动的接口地址,如:http://192.168.0.xx:80/v1

0 commit comments

Comments
 (0)