08-基于LLaMA-Factory的模型微调训练 #159
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: HswOAuth/llm_course#159
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
https://www.yuque.com/hkutangyu/di80sc/oy84gbs16y1ubzdd
step1: AutoDL租用显卡
https://www.autodl.com/console/instance/list?random=1727683224641



1. 选择RTX4090D,选择基础镜像PyTorch/2.1.2/3.10(ubuntu22.04)/11.8
2. 打开JupyterLab
step2: 安装LLaMA-Factor环境
验证安装是否成功:llamafactory-cli version
step3: 启动web界面
step4: 设置隧道
ssh -CNgv -L 7860:127.0.0.1:7860 root@connect.cqa1.seetacloud.com -p 25329
step5: 测试基座模型
step6: 微调训练
step7: 测试微调效果
step8: 4bit微调训练
step9: 测试4bit微调效果
step10: 使用仿OpenAI接口启动微调模型
llamafactory-cli api --model_name_or_path /root/autodl-tmp/modelscope/hub/ZhipuAI/glm-4-9b-chat --template glm4 --adapter_name_or_path saves/GLM-4-9B-Chat/lora/train_2024-10-08-11-21-36 --finetuning_type lora
ssh -CNgv -L 8000:127.0.0.1:8000 root@connect.cqa1.seetacloud.com -p 25329