00000419
apt-get install git-lfs 或者yum install git-lfs
mkdir -p /home/Qwen/
cd /home/Qwen/
git clone https://www.modelscope.cn/Qwen/Qwen2.5-72B-Instruct-GPTQ-Int4.git
在windows上通过FileZilla工具下载,文件->站点管理器->新站点
协议:选择SFTP-SSH File Transfer Protocol
通过SFTP下载,SFTP下载地址和密码,请联系天数售后工程师获取
在远程站点内输入/client_tmp/models/ 把文件Qwen2.5-72B-Instruct-GPTQ-Int4.tar.gz拷贝到windows本地目录上,然后放到服务器/home/Qwen/目录下
cd /home/Qwen/
tar -zxvf Qwen2.5-72B-Instruct-GPTQ-Int4.tar.gz
docker pull harbor.iluvatar.com.cn:10443/saas/mr-bi150-4.3.0-x86-ubuntu20.04-py3.10-poc-llm-infer:v1.2.3
在windows上通过FileZilla工具下载,文件->站点管理器->新站点
协议:选择SFTP-SSH File Transfer Protocol
通过SFTP下载,SFTP下载地址和密码,请联系天数售后工程师获取
在远程站点内输入/client_tmp/support/,把mr-bi150-4.3.0-x86-ubuntu20.04-py3.10-poc-llm-infer-v1.2.3.tar文件拷贝到windows本地目录上,然后放到服务器/home目录下
执行 docker load -i /home/mr-bi150-4.3.0-x86-ubuntu20.04-py3.10-poc-llm-infer-v1.2.3.tar
docker run -dit -v /usr/src:/usr/src -v /lib/modules:/lib/modules -v /dev:/dev -v /home:/home --network=host --name=Qwen3 --ipc=host --privileged --cap-add=ALL --pid=host harbor.iluvatar.com.cn:10443/saas/mr-bi150-4.3.0-x86-ubuntu20.04-py3.10-poc-llm-infer:v1.2.3 /bin/bash
进入容器
docker exec -it Qwen3 bash
export VLLM_ENFORCE_CUDA_GRAPH=1
export VLLM_FORCE_USE_CUDA_GRAPH=1
cd /root/apps/llm-modelzoo/inference/Qwen/vllm
python3 offline_inference.py --model /home/Qwen/Qwen2.5-72B-Instruct-GPTQ-Int4/ --max-tokens 256 --max-model-len 8192 -tp 2 --temperature 0.0 --quantization gptq
(注:当前 --max-model-len≥8192时,需要加上--max-seq-len-to-capture=8192(这个值需要和max-model-len参数值对应,例如--max-model-len 10240 --max-seq-len-to-capture=10240)
# server 端
export VLLM_ENFORCE_CUDA_GRAPH=1
export VLLM_FORCE_USE_CUDA_GRAPH=1
python3 -m vllm.entrypoints.openai.api_server --model /home/Qwen/Qwen2.5-72B-Instruct-GPTQ-Int4/ --gpu-memory-utilization 0.9 --max-num-batched-tokens 10000 --max-model-len 10000 --max-num-seqs 256 -tp 2 --host 0.0.0.0 --port 1234 --trust-remote-code --quantization gptq
# 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/Qwen2.5-72B-Instruct-GPTQ-Int4/","prompt": "介绍一下湖南省常德市","temperature": 0.0,"max_tokens": 512}'