06-Function Call实战练习 #141

Open
opened 2024-09-28 14:27:58 +08:00 by 12535224197cs · 0 comments

申请国内其他大模型apikey,对照官方API文档使用functioncall:#83 (comment)

step1: 在【训练管理】中创建训练任务

4机16卡训练用时:2d18h34m44s
x.jpeg

step2: 在【模型调试】打开notebook

x.jpeg

step3: 查看训练好的模型文件

ls -lt /userhome/llama3-8b-ft/agent-flan
x.jpeg

step4: 将pt模型转成hf格式

xtuner convert pth_to_hf /userhome/llama3-8b-ft/agent-flan/llama3_8b_instruct_qlora_agentflan_3e.py /userhome/llama3-8b-ft/agent-flan/iter_6441.pth /userhome/llama3-8b-ft/agent-flan/iter_6441_hf
x.jpeg

step5: lora hf格式模型合并

xtuner convert merge /dataset/Llama-3-8B-Instruct/ /userhome/llama3-8b-ft/agent-flan/iter_6441_hf /code/llama3-8b-ft/agent-flan/6441merged --device cpu
x.jpeg

step6: 调用模型问答

x.jpeg

申请国内其他大模型apikey,对照官方API文档使用functioncall:https://hsw-git.huishiwei.cn/HswOAuth/llm_course/issues/83#issue-84 ### step1: 在【训练管理】中创建训练任务 4机16卡训练用时:2d18h34m44s ![x.jpeg](https://cdn.nlark.com/yuque/0/2024/png/44993204/1727503735593-47bac03b-0d14-45f1-b81e-9e3a768d28ab.png?x-oss-process=image%2Fresize%2Cw_1500%2Climit_0) ### step2: 在【模型调试】打开notebook ![x.jpeg](https://cdn.nlark.com/yuque/0/2024/png/44993204/1727505056038-bd7e8770-0c6c-45ee-8e1e-c68df417b144.png?x-oss-process=image%2Fresize%2Cw_1500%2Climit_0) ### step3: 查看训练好的模型文件 `ls -lt /userhome/llama3-8b-ft/agent-flan` ![x.jpeg](https://cdn.nlark.com/yuque/0/2024/png/44993204/1727503766402-2423d221-e351-419c-9707-cd93036e5faa.png?x-oss-process=image%2Fresize%2Cw_1500%2Climit_0) ### step4: 将pt模型转成hf格式 `xtuner convert pth_to_hf /userhome/llama3-8b-ft/agent-flan/llama3_8b_instruct_qlora_agentflan_3e.py /userhome/llama3-8b-ft/agent-flan/iter_6441.pth /userhome/llama3-8b-ft/agent-flan/iter_6441_hf` ![x.jpeg](https://cdn.nlark.com/yuque/0/2024/png/44993204/1727503835422-d7e31baa-2bb1-4edb-841a-f940f9f702f0.png?x-oss-process=image%2Fresize%2Cw_1500%2Climit_0) ### step5: lora hf格式模型合并 `xtuner convert merge /dataset/Llama-3-8B-Instruct/ /userhome/llama3-8b-ft/agent-flan/iter_6441_hf /code/llama3-8b-ft/agent-flan/6441merged --device cpu` ![x.jpeg](https://cdn.nlark.com/yuque/0/2024/png/44993204/1727503991046-8f35bfe3-1a00-4939-a0a1-53ab7035ee3a.png?x-oss-process=image%2Fresize%2Cw_1500%2Climit_0) ### step6: 调用模型问答 ![x.jpeg](https://cdn.nlark.com/yuque/0/2024/png/44993204/1727504002042-d366c6b6-3003-44da-a5bd-c9a0bed7489d.png?x-oss-process=image%2Fresize%2Cw_1500%2Climit_0)
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: HswOAuth/llm_course#141
No description provided.