-
Notifications
You must be signed in to change notification settings - Fork 6.2k
add Sequence Parallelism (reopened #6506) #7338
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
base: main
Are you sure you want to change the base?
Conversation
Nice work, we expect to add this feature to LlamaFactory v1.0 |
#7335 Has a new implementation with Deepspeed Ulysses, please consider it as an alternative solution. |
@xiaosu-zhu Thanks for pointing it out! Deepspeed Ulysses is always on our ToDo list and we have already integrated it recently and now pushed here, supporting This PR reopened #6506, which was opened on Jan.2 and accidentally closed last week #6506 (comment). #7335 may represent alternative nice ways to split SP data and monkey patching. Still, to get SP 100% correct requires much more detailed work in dealing with padding, labels and loss computation etc. (as we've discussed Swift here), followed by thorough testing. We are confident that our implementation is 100% correct up to numerical differences inherent to SP, and our implementation bears close-to-minimal modular code change to original LLaMA-Factory. |
does it support DPO? |
@zhijie-reallm yeah |
does it support liger_kernel? |
@zhijie-reallm SP is not compatible with liger_kernel right now, but we are working on it. |
|
在src/llamafactory/data/processor/supervised.py |
@burkun 你指哪里?是llama-factory本身的代码还是我们增加的部分? |
现象描述:在开启packing的序列并行中,会出现loss 有频繁尖刺的情况,这个时候grad norm也比较高;同样的数据集,关闭packing就没有这个现象了。 |
@burkun 用的是我们的repo吗?我们训过很多SP+packing的版本,印象中没有碰到过这个问题。 |
TODO是本来就有的。我这几天不用这个pull request, 而是换成https://github.com/Qihoo360/360-LLaMA-Factory 这里的版本,同样的配置和数据,就没有问题了。可能是这个PR跟360-LLaMA-Factory原本的没对齐 |
@burkun 是的,这个PR是专门为了跟上llama-factory主仓更新,可能测试不够充分,保持更新也略微困难。一般可以先用https://github.com/Qihoo360/360-LLaMA-Factory 的默认分支 |
有更新吗?感觉挺想用这个的。我基于原版llamafactory写了一些改动,如果是又切换到360的llamafactory版本,还是有点麻烦的。所以还是问问这个大概啥时候能merge呢,期待。 |
What does this PR do?
add Sequence Parallelism (reopened #6506)
Before submitting