litgpt icon indicating copy to clipboard operation
litgpt copied to clipboard

8-bit precision training

Open rasbt opened this issue 1 year ago • 5 comments
trafficstars

Might be worthile to look into

from torchao.float8 import convert_to_float8_training
convert_to_float8_training(model)

some time

rasbt avatar Oct 10 '24 15:10 rasbt

I watched this week this video: https://www.youtube.com/watch?v=Br07GsnnvWc

This performance is expected:

image

About Embedding layer, it should be investigated if they use appropriate class like this one, or we need to take care of it: https://github.com/pytorch/ao/blob/e7b33bc91c831d10249c1222c8b4b667f18f28b7/torchao/quantization/prototype/qat/embedding.py#L27

mtasic85 avatar Oct 13 '24 18:10 mtasic85

Thanks for sharing this. Need to check out the video some time. It's long (but good explanations of tricky things are naturally long) but looks really informative.

rasbt avatar Oct 22 '24 00:10 rasbt

Hi @t-vi, I see that you are quite active here. Any chance to get this integrated in litgpt?

mtasic85 avatar Feb 20 '25 20:02 mtasic85

Thank you for pinging @mtasic85 . We're looking into more fp8 support, but we likely want to deliver this through Thunder, which will compile models to use optimizations. We do have initial fp8 support through NVIDIA TransformerEngine, starting with matmuls. We will likely show examples in ~1 month to 6 weeks.

t-vi avatar Feb 20 '25 22:02 t-vi

any update on this?

codestar12 avatar Apr 17 '25 05:04 codestar12