ブルーアーカイブ
100 字
1 分钟
Qwen2.5-7B-Instruct 部署
使用集群
NVIDIA GeForce RTX 3090 8x
- GPU memory:24GB per GPU
- NVIDIA Driver Version:530.30.02
- CUDA Version:12.1
创建环境
Python Version:3.10
conda create -p /data/<username>/envs/qwen python=3.10 -yconda activate /data/<username>/envs/qwen安装依赖
安装 PyTorch、vLLM 及相关依赖:
pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 \ --index-url https://download.pytorch.org/whl/cu121pip install vllm==0.6.6.post1 \ -i https://pypi.tuna.tsinghua.edu.cn/simplepip install -U huggingface_hub \ -i https://pypi.tuna.tsinghua.edu.cn/simple较新版本的 transformers 依赖更高版本的 PyTorch dtype 支持,因此回退到兼容版本:
pip uninstall -y transformers tokenizerspip install transformers==4.45.2 tokenizers==0.20.3 \-i https://pypi.tuna.tsinghua.edu.cn/simple下载模型
export HF_ENDPOINT=https://hf-mirror.comhf download Qwen/Qwen2.5-7B-Instruct \ --local-dir /data/<username>/models/Qwen2.5-7B-Instruct模型部署
export HF_HUB_OFFLINE=1export TRANSFORMERS_OFFLINE=12 张 GPU 并行:
CUDA_VISIBLE_DEVICES=0,1 vllm serve \ /data/<username>/models/Qwen2.5-7B-Instruct \ --host 0.0.0.0 \ --port 8002 \ --served-model-name chat-model \ --tensor-parallel-size 2测试模型
curl http://127.0.0.1:8002/v1/modelscurl http://127.0.0.1:8002/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ "model":"chat-model", "messages":[ { "role":"user", "content":"介绍一下后训练中的GRPO算法" } ] }'最终效果如下:

分享
如果这篇文章对你有帮助,欢迎分享给更多人!
Qwen2.5-7B-Instruct 部署
https://kisaragi-irona.top/posts/project/qwen25-7b-instruct/blog/ 部分信息可能已经过时
相关文章 智能推荐
1
使用 Conda 配置 EasyR1 训练环境
技术 Configure EasyR1 with Conda for Qwen2.5-VL-3B GRPO training on four RTX 3090 GPUs.
2
Research Journey
科研 My weekly research summary
3
Qwen2.5-VL-3B GRPO 训练分析
科研 Reproducing GRPO training for Qwen2.5-VL-3B with EasyR1 and analyzing its performance, stability, and resource usage on Geometry3K.
4
RLHF algorithms, from PPO to DAPO
科研 RLHF algorithms including PPO, DPO, GRPO, DAPO
5
Qwen 2 Tech Report
科研 Qwen2 Technical Report






