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
ModelZoo
LLaVA_vllm
Commits
6c55ab0d
Commit
6c55ab0d
authored
Nov 27, 2024
by
laibao
Browse files
Updata Readme
添加端口映射
parent
73241d30
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
README.md
README.md
+16
-4
No files found.
README.md
View file @
6c55ab0d
...
@@ -141,31 +141,43 @@ curl http://localhost:8000/v1/chat/completions \
...
@@ -141,31 +141,43 @@ curl http://localhost:8000/v1/chat/completions \
pip install gradio
pip install gradio
```
```
2.
安装必要文件
2.
安装必要文件
与端口映射
2.1 启动gradio服务,根据提示操作
2.1 启动gradio服务,根据提示操作
```
```
python gradio_openai_vlm_webserver.py --model "/mnt/data/llm-models/llava/llava-1.5-7b-hf" --model-url http://localhost:8000/v1
python gradio_openai_vlm_webserver.py --model "/mnt/data/llm-models/llava/llava-1.5-7b-hf" --model-url http://localhost:8000/v1
--host "0.0.0.0" --port 8001
```
```
2.2 更改文件权限
2.2 更改文件权限
打开提示下载文件目录,输入以下命令给予权限
打开提示下载文件目录,输入以下命令给予权限
```
```
chmod +x frpc_linux_amd64_v0.*
chmod +x frpc_linux_amd64_v0.*
```
```
2.
3端口映射
```
ssh -L 8000:计算节点IP:8000 -L 8001:计算节点IP:8001 用户名@登录节点 -p 登录节点端口
```
3.
启动OpenAI兼容服务
3.
启动OpenAI兼容服务
`cd examples`
`cd examples`
```
```
python -m vllm.entrypoints.openai.api_server --model /mnt/data/llm-models/llava/llava-1.5-7b-hf --image-input-type pixel_values --image-token-id 32000 --image-input-shape 1,3,336,336 --image-feature-size 576 --chat-template template_llava.jinja
python -m vllm.entrypoints.openai.api_server --model /mnt/data/llm-models/llava/llava-1.5-7b-hf --image-input-type pixel_values --image-token-id 32000 --image-input-shape 1,3,336,336 --image-feature-size 576 --chat-template template_llava.jinja --port 8000 --host "0.0.0.0"
```
4.
启动gradio服务
```
python gradio_openai_vlm_webserver.py --model "/mnt/data/llm-models/llava/llava-1.5-7b-hf" --model-url http://localhost:8000/v1 --host "0.0.0.0" --port 8001"
```
```
4
.
使用对话服务
5
.
使用对话服务
在浏览器中输入本地 URL,可以使用 Gradio 提供的对话服务。
在浏览器中输入本地 URL,可以使用 Gradio 提供的对话服务。
...
...
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