hpcaitech / ColossalAI

Making large AI models cheaper, faster and more accessible
https://www.colossalai.org
Apache License 2.0
38.83k stars 4.35k forks source link

[FEATURE]: Is it Possible to integrate Liger-Kernel? #6047

Open ericxsun opened 2 months ago

ericxsun commented 2 months ago

Describe the feature

https://github.com/linkedin/Liger-Kernel

Liger Kernel is a collection of Triton kernels designed specifically for LLM training. It can effectively increase multi-GPU training throughput by 20% and reduce memory usage by 60%. We have implemented Hugging Face Compatible RMSNorm, RoPE, SwiGLU, CrossEntropy, FusedLinearCrossEntropy, and more to come.

Edenzzzz commented 2 months ago

Seems like a pretty light-weight library. cc @ver217 @isky-cd Any take on this? 😃

isky-cd commented 2 months ago

Liger Kernel is a collection of Triton kernels designed specifically for LLM training. It can effectively increase multi-GPU training throughput by 20% and reduce memory usage by 60%. We have implemented Hugging Face Compatible RMSNorm, RoPE, SwiGLU, CrossEntropy, FusedLinearCrossEntropy, and more to come.

I think this is a good attempt.

ver217 commented 2 months ago

Does it compare with apex's implementation? We've integrate some apex cuda kernels and some of them are also implemented in Liger-kernel.

Edenzzzz commented 2 months ago

I think Apex only provides fused RMSNorm and LayerNorm kernels? They have some more

image
ericxsun commented 1 month ago

Any good news? Thanks a lot

Edenzzzz commented 1 month ago

I think they are short-handed in wrapping up Zero Bubble, hybrid seq parallel and then they will focus on accelerate intergration? Feel free to ask other members to clarify further, but it'd be great if the community can make an initial PR on this, then we can help/comment. This is an open-source initiative after all, and we always welcome contributions🙂

ericxsun commented 5 days ago

Is there any documentation available on how to integrate a new kernel? So we can make a PR on this. Thanks a lot.