Liger-Kernel icon indicating copy to clipboard operation
Liger-Kernel copied to clipboard

[fun] llama.triton

Open ByronHsu opened this issue 1 year ago • 7 comments

🚀 The feature, motivation and pitch

@thomwolf and i have an idea to implement llama from scratch in pure triton, inspired by karpathy. liger kernel already contains most of the kernels except matmul. We would love to call out for any interested! It can be added under our example/ folder!

Alternatives

No response

Additional context

No response

ByronHsu avatar Aug 27 '24 15:08 ByronHsu

omw

ziliangpeng avatar Aug 27 '24 15:08 ziliangpeng

i implemented gpt-2 in triton few days back. Ig llama would be similar- just need to implement some specific layers.

sharing if someone wants the starting code!

thevasudevgupta avatar Aug 28 '24 02:08 thevasudevgupta

@thevasudevgupta Could you please share the specific code so that I can directly look into it ?

vigneshbp avatar Aug 28 '24 03:08 vigneshbp

ohh; I forgot to link it. sorry;

https://github.com/thevasudevgupta/gpt-triton

thevasudevgupta avatar Aug 28 '24 03:08 thevasudevgupta

Do you guys think a triton based inference engine would be a good path?

kerthcet avatar Aug 28 '24 04:08 kerthcet

@kerthcet no we want to do training here. triton based inference already has too many options like vllm

ByronHsu avatar Aug 28 '24 04:08 ByronHsu

about the mm kernel, I wrote something like that, if that interests anyone

if the todos there are fixed, I think a pr would make sense?

ghostway0 avatar Aug 31 '24 13:08 ghostway0