-
Notifications
You must be signed in to change notification settings - Fork 4.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add swanlab for experiment tracking and visualization. #6401
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thanks for integrating the awesome SwanLab into LlamaFactory, can you see the above comments and consider solving them?
Very good suggestion, I have submitted a new commit based on your comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Before submitting
如何在LLaMA Factory中使用SwanLab?
SwanLab 是一个开源的模型训练记录工具,面向AI研究者,提供了训练可视化、自动日志记录、超参数记录、实验对比、多人协同等功能。在SwanLab上,研究者能基于直观的可视化图表发现训练问题,对比多个实验找到研究灵感,并通过在线链接的分享与基于组织的多人协同训练,打破团队沟通的壁垒。
为什么要记录训练
相较于软件开发,模型训练更像一个实验科学。一个品质优秀的模型背后,往往是成千上万次实验。研究者需要不断尝试、记录、对比,积累经验,才能找到最佳的模型结构、超参数与数据配比。在这之中,如何高效进行记录与对比,对于研究效率的提升至关重要。
在LLaMA Factory中使用
方式一:CLI
在yaml配置文件中,增加如下代码(注释的部分,代表选填):
然后CLI启动命令即可:
方式二:WebUI
启动WebUI:
在GUI中对应栏位填写参数后,启动训练后,在系统的命令行打印中找到SwanLab实验链接访问即可:
备注
SwanLab API Key如何获取
在官网或备用官网注册/登录账号,在设置中找到API Key。
如果你使用local模式,则无需 API Key。
一些交互上的想法
如果在「SwanLab 参数设置」选项卡中,能够增加一个按钮,点击跳转到对应的SwanLab链接,那用户体验就更好了:),暂时在开发上不知道要怎么写。
获取链接的代码: