Overseas access: www.kdjingpai.com
Bookmark Us
Current Position:fig. beginning " AI Answers

使用SFT-LoRA方法微调Qwen3模型的具体流程是怎样的?

2025-08-28 39

SFT-LoRA微调完整流程

  1. Model Download:通过modelscope获取基础模型
    modelscope download --model Qwen/Qwen3-1.7B --local_dir ./Qwen3/Qwen3-1.7B
  2. Data preparation:将训练数据整理为项目要求的JSON格式,参考data/目录下的示例文件
  3. priming training:通过命令行运行训练脚本
    python Supervised_FineTuning/train_sft_dirty.py 
    --model_path ./Qwen3/Qwen3-1.7B 
    --dataset_path data/dirty_chinese_dpo.json 
    --sft_adapter_output_dir ./output/sft_adapter_demo
  4. 模型验证:训练完成后进行交互测试
    python inference/inference_dirty_sft.py 
    --model_path ./Qwen3/Qwen3-1.7B 
    --adapter_path ./output/sft_adapter_demo 
    --mode interactive

Technical Advantages

LoRA技术通过低秩适配实现高效微调,相比全参数微调可节省50%以上的显存占用,同时保持约90%的模型性能,非常适合资源有限的开发场景。

Recommended

Can't find AI tools? Try here!

Just type in the keyword Accessibility Bing SearchYou can quickly find all the AI tools on this site.

Top

en_USEnglish