Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
laibao
Qwen2.5_vllm
Commits
15c6147a
Commit
15c6147a
authored
Oct 15, 2024
by
laibao
Browse files
[ReadMe]更新gradio配置
parent
37ec78ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
0 deletions
+40
-0
README.md
README.md
+40
-0
No files found.
README.md
View file @
15c6147a
...
...
@@ -170,6 +170,46 @@ curl http://localhost:8000/v1/chat/completions \
或者使用
[
examples/openai_chatcompletion_client.py
](
examples/openai_chatcompletion_client.py
)
### **gradio和vllm结合使用**
1.
安装gradio
```
pip install gradio
```
2.
安装必要文件
2.1 启动gradio服务,根据提示操作
```
python gradio_openai_chatbot_webserver.py --model "Qwen/Qwen2.5-7B-instruct" --model-url http://localhost:8000/v1 --temp 0.8 --stop-token-ids ""
```
2.2 更改文件权限
打开提示下载文件目录,输入以下命令给予权限
```
chmod +x frpc_linux_amd64_v0.*
```
3.
启动OpenAI兼容服务
```
python -m vllm.entrypoints.openai.api_server --model Qwen/Qwen2.5-7B-instruct --enforce-eager --dtype float16 --trust-remote-code --port 8000
```
4.
启动gradio服务
```
python gradio_openai_chatbot_webserver.py --model "Qwen/Qwen2.5-7B-instruct" --model-url http://localhost:8000/v1 --temp 0.8 --stop-token-ids ""
```
5.
使用对话服务
在浏览器中输入本地 URL,可以使用 Gradio 提供的对话服务。
## result
使用的加速卡:1张 DCU-K100_AI-64G
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment