一、环境搭建
conda create -n dseek python=3.10
conda activate dseek
pip install bitsandbytes
Pip install numpy
python -m pip install --upgrade pip setuptools wheel
安装cuda,torch,Unsloth, huggingface,wandb等,见前述章节;
微调服务器配置:单机笔记本显卡4060,32GB ram,8GB vram,
二、下载模型
可以基于任何模型微调,如deepseek v3或r1;也可针对任何量化的版本,用deepseek 8b 4位量化模型:unsloth/DeepSeek-R1-Distill-Llama-8B-unsloth-bnb-4bit。
set HF_ENDPOINT = "https://hf-mirror.com"
huggingface-cli download unsloth/DeepSeek-R1-Distill-Llama-8B-unsloth-bnb-4bit --