模型转换为 BF16
更新时间:2025年3月19日 09:19
浏览:211
代码:
https://github.com/deepseek-ai/DeepSeek-V3/blob/main/inference/fp8_cast_bf16.py
脚本:
# 先下载好原始模型, 存放在 /path/to/DeepSeek-R1
# 创建目录,存放转换后的模型
mkdir /path/to/DeepSeek-BF16
git clone https://github.com/deepseek-ai/DeepSeek-V3/
python3 DeepSeek-V3/inference/fp8_cast_bf16.py --input-fp8-hf-path /path/to/DeepSeek-R1 --output-bf16-hf-path /path/to/DeepSeek-BF16