Skip to content

Conversation

2Elian
Copy link

@2Elian 2Elian commented Sep 11, 2025

训练启动代码,拥有更多的配置信息,方便更改,只需启动sh文件即可。

@HAOCHENYE
Copy link
Collaborator

感谢你的贡献,不过我看 PR 的内容里,除了新增启动代码,貌似还包含了一些其他模块的更新。我们应该还是尽可能保证 PR 的独立性,不同的功能分多个 PR 提交。

@@ -0,0 +1,31 @@
import torch.distributed as dist
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

xtuner/v1/train/cli/sft.py

已经是一个训练入口了,这个 main 入口的差别是?

@@ -0,0 +1,48 @@
#!/bin/bash
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个适合放在 tutorial 或者 examples 里,不适合放在库的核心代码里。以及这里其实有比较多的,贴近个人风格的写法,他更适合作为文档中的最佳实践的推荐写法。

此外有一些环境变量和步骤应该也不是必须的,例如 conda activate,CUDA_HOME,LD_LIBRARY_PATH 这些,不同环境下也容易失效

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants