03-大模型提示词工程实践(跟练)-微调CodeLlama-7b-hf模型 #17
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#17
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?
必备条件
(模型训练时间:2小时15分钟)
step1: 创建notebook
算法:(prompts04)复制公共算法prompts_enginnering_04

镜像:(aihpc3-with-vscode:v0)
数据:(huggingface-cache)包含了模型'/dataset/CodeLlama-7b-hf/'和数据集'/dataset/datasets/sql_datasets'
task:2(使用2机8卡)
step2: 使用数据集sql_datasets微调CodeLlama-7b-hf模型
1、打开task0,task1两个notebook

2、将task0打开的notebook作为master,获取该机器的IP地址,该机器的地址为10.244.37.87
3、在task0运行:NPROC_PER_NODE=4 NNODES=2 PORT=12345 ADDR=10.244.37.87 NODE_RANK=0 xtuner train llama2_7b_chat_qlora_sql_e3_copy.py --work-dir /code/xtuner-workdir --deepspeed deepspeed_zero3_offload
4、在task1运行:NPROC_PER_NODE=4 NNODES=2 PORT=12345 ADDR=10.244.37.87 NODE_RANK=1 xtuner train llama2_7b_chat_qlora_sql_e3_copy.py --work-dir /code/xtuner-workdir --deepspeed deepspeed_zero3_offload

5、在task0查看训练进度完成模型训练,模型训练时间:2小时15分钟。


6、使用微调前和微调后的模型进行问答对比
大模型提示词工程实践(跟练)-微调CodeLlama-7b-hf模型to 03-大模型提示词工程实践(跟练)-微调CodeLlama-7b-hf模型