首页 > 新闻中心
35PyTorch >= 2.0、CUDA >= 11.8以及Python 3.10+的环境。闪电云平台通常提供“Deep Learning Base”或“LLM Fine-tuning”专用镜像,能为您节省数小时的依赖安装时间。ssh root@<您的实例IP>git clone https://github.com/hiyouga/LLaMA-Factory.git
cd LLaMA-Factory
pip install -e .[torch,metrics]my_data.json),格式如下:[
{
"instruction": "请解释什么是量子纠缠",
"input": "",
"output": "量子纠缠是一种量子力学现象..."
},
...
]llamafactory-cli webuiQwen-7B-Chat。lora(低秩适应)。相比全量微调,LoRA只需训练极少量的参数,显存占用小,速度快,效果却非常接近。my_data。nvidia-smi,观察显存占用情况。如果爆显存(OOM),请减小 batch_size 或 cutoff_len,或者开启 gradient_checkpointing。llamafactory-cli export \
--model_name_or_path Qwen-7B-Chat \
--adapter_name_or_path output_dir \
--template qwen \
--export_dir merged_model
扫码关注公众号
扫微信在线客服
扫微信在线客服