只能用pytorch:2.3.0-ubuntu22.04-dtk24.04.3-py3.10 版本的镜像吗?可以用最新的vllm:0.11吗?
运行该项目需要4x8x64GB显存,硬件配置为K100-AI。
git clone http://developer.sourcefind.cn/codes/modelzoo/deepseek-v3_pytorch.git
1、获取docker镜像
docker pull image.sourcefind.cn:5000/dcu/admin/base/pytorch:2.3.0-ubuntu22.04-dtk24.04.3-py3.10
2、创建并运行docker容器
docker run --shm-size 500g --network=host --name=dpskv3 --privileged --device=/dev/kfd --device=/dev/dri --group-add video --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v <获取的项目代码地址>:/home/ -v /opt/hyhal:/opt/hyhal:ro -it <上一步获取的docker镜像ID> bash
注意: 可以使用 docker images 获取相应的镜像ID。
3、依赖项安装
cd /home/inference
pip install -r requirements.txt
1、下载模型
有两种方式可下载模型分别是使用SCNet及huggingface下载,具体方式分别为
git clone http://113.200.138.88:18080/aimodels/deepseek-ai/DeepSeek-V3.git
export HF_ENDPOINT=https://hf-mirror.com
huggingface-cli download --resume-download deepseek-ai/DeepSeek-V3 --local-dir DeepSeek-V3
2、模型转换
cd inference python fp8_cast_bf16.py --input-fp8-hf-path /path/to/fp8_weights --output-bf16-hf-path /path/to/DeepSeek-V3-bf16
注意,这里的/path/to/fp8_weights就是 下载模型 部分得到的模型.
3、模型划分
python convert.py --hf-ckpt-path /path/to/DeepSeek-V3-bf16 --save-path /path/to/DeepSeek-V3-Demo --n-experts 256 --model-parallel 32
4、文件复制
cp /path/to/fp8_weights/*.json /path/to/DeepSeek-V3-Demo
export NCCL_ALGO=Ring
export NCCL_PROTO=Simple
torchrun --nnodes 4 --nproc-per-node 8 --node-rank $RANK --master-addr $ADDR generate.py --ckpt-path /path/to/DeepSeek-V3-Demo --config configs/config_671B.json --interactive --temperature 0.7 --max-new-tokens 200


暂无数据