00000280
apt-get install git-lfs 或者yum install git-lfs
mkdir -p /home/Qwen/
cd /home/Qwen/
git clone https://www.modelscope.cn/Qwen/Qwen3-4B.git
git clone https://www.modelscope.cn/Qwen/Qwen3-8B.git
git clone https://www.modelscope.cn/Qwen/Qwen3-14B.git
git clone https://www.modelscope.cn/Qwen/Qwen3-32B.git
git clone https://www.modelscope.cn/Qwen/Qwen3-30B-A3B.git
git clone https://www.modelscope.cn/Qwen/Qwen3-235B-A22B.git
cd /home/Qwen/
git clone https://gitee.com/121786404/corex_knife.git
在windows上通过FileZilla工具下载,文件->站点管理器->新站点
协议:选择SFTP-SSH File Transfer Protocol
主机: iftp.iluvatar.com.cn 端口:29880
用户:iluvatar_mr
密码:联系天数工程师
在远程站点内输入 /client_tmp/support/vllm 然后回车,把目录下两个文件拷贝到您本地windows目录下,然后将这两个文件放在服务器/home/Qwen/corex_knife/deploy/vllm/offline 目录下,如果服务器上没有此目录,可以通过
mkdir -p /home/Qwen/corex_knife/deploy/vllm/offline 创建
docker pull crpi-92uj7jb20gffz04j.cn-guangzhou.personal.cr.aliyuncs.com/iluvatar_common/vllm0.7.3-4.2.0:v6
在远程站点内输入/client_tmp/support/,把Qwen3_v6_SDK4.2.tar 文件拷贝到windows本地目录上,然后放到服务器/home目录下
执行 docker load -i /home/Qwen3_v6_SDK4.2.tar
docker run -it -v /usr/src:/usr/src -v /lib/modules:/lib/modules -v /dev:/dev -v /home:/home --network=host --name=Qwen3 --pid=host --ipc=host --privileged --cap-add=ALL --pid=host crpi-92uj7jb20gffz04j.cn-guangzhou.personal.cr.aliyuncs.com/iluvatar_common/vllm0.7.3-4.2.0:v6 /bin/bash
cd /home/Qwen/corex_knife/deploy/vllm/offline
python3 offline_inference.py --model /home/Qwen/Qwen3-4B/ --max-tokens 256 --temperature 0.0 --max-model-len 3096
python3 offline_inference.py --model /home/Qwen/Qwen3-8B/ --max-tokens 256 --temperature 0.0 --max-model-len 3096
python3 offline_inference.py --model /home/Qwen/Qwen3-14B/ --max-tokens 256 -tp 2 --temperature 0.0 --max-model-len 3096
python3 offline_inference.py --model /home/Qwen/Qwen3-32B/ --max-tokens 256 -tp 4 --temperature 0.0 --max-model-len 3096
python3 offline_inference.py --model /home/Qwen/Qwen3-30B-A3B/ --max-tokens 256 -tp 4 --temperature 0.0 --max-model-len 3096
python3 offline_inference.py --model /home/Qwen/Qwen3-235B-A22B/ --max-tokens 256 -tp 16 --temperature 0.0 --max-model-len 3096 --gpu-memory-utilization 0.97
# server 端
python3 -m vllm.entrypoints.openai.api_server --model /home/Qwen/Qwen3-4B/ --gpu-memory-utilization 0.9 --max-num-batched-tokens 5120 --max-model-len 2048 --max-num-seqs 256 --host 0.0.0.0 --port 1234 --trust-remote-code
python3 -m vllm.entrypoints.openai.api_server --model /home/Qwen/Qwen3-8B/ --gpu-memory-utilization 0.9 --max-num-batched-tokens 5120 --max-model-len 2048 --max-num-seqs 256 --host 0.0.0.0 --port 1234 --trust-remote-code
python3 -m vllm.entrypoints.openai.api_server --model /home/Qwen/Qwen3-14B/ --gpu-memory-utilization 0.9 --max-num-batched-tokens 5120 --max-model-len 2048 --max-num-seqs 256 -tp 2 --host 0.0.0.0 --port 1234 --trust-remote-code
python3 -m vllm.entrypoints.openai.api_server --model /home/Qwen/Qwen3-32B/ --gpu-memory-utilization 0.9 --max-num-batched-tokens 5120 --max-model-len 2048 --max-num-seqs 256 -tp 4 --host 0.0.0.0 --port 1234 --trust-remote-code --distributed-executor-backend ray
python3 -m vllm.entrypoints.openai.api_server --model /home/Qwen/Qwen3-30B-A3B/ --gpu-memory-utilization 0.9 --max-num-batched-tokens 5120 --max-model-len 2048 --max-num-seqs 256 -tp 4 --host 0.0.0.0 --port 1234 --trust-remote-code --distributed-executor-backend ray
python3 -m vllm.entrypoints.openai.api_server --model /home/Qwen/Qwen3-235B-A22B/ --gpu-memory-utilization 0.97 --max-num-batched-tokens 5120 --max-model-len 2048 --max-num-seqs 256 -tp 16 --host 0.0.0.0 --port 1234 --trust-remote-code --distributed-executor-backend ray
# client 端
curl -X POST http://0.0.0.0:1234/v1/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"model": "/home/Qwen/Qwen3-4B/","prompt": "介绍一下湖南省常德市","temperature": 0.0,"max_tokens": 512}'
curl -X POST http://0.0.0.0:1234/v1/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"model": "/home/Qwen/Qwen3-8B/","prompt": "介绍一下湖南省常德市","temperature": 0.0,"max_tokens": 512}'
curl -X POST http://0.0.0.0:1234/v1/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"model": "/home/Qwen/Qwen3-14B/","prompt": "介绍一下湖南省常德市","temperature": 0.0,"max_tokens": 512}'
curl -X POST http://0.0.0.0:1234/v1/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"model": "/home/Qwen/Qwen3-32B/","prompt": "介绍一下湖南省常德市","temperature": 0.0,"max_tokens": 512}'
curl -X POST http://0.0.0.0:1234/v1/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"model": "/home/Qwen/Qwen3-30B-A3B/","prompt": "介绍一下湖南省常德市","temperature": 0.0,"max_tokens": 512}'
curl -X POST http://0.0.0.0:1234/v1/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"model": "/home/Qwen/Qwen3-235B-A22B/","prompt": "介绍一下湖南省常德市","temperature": 0.0,"max_tokens": 512}'