Lightning-AI/lightning-thunder
A source-to-source PyTorch compiler that optimizes deep learning models for training and inference through transformations, kernel fusion, and distributed strategies.

Lightning Thunder is a PyTorch compiler that transforms models into optimized implementations through source-to-source compilation. It provides a Pythonic intermediate representation capturing the full computation, along with a system of transforms that operate on the IR, model, and weights simultaneously. The compiler supports quantization, mixed precision (FP4/FP6/FP8), distributed training strategies (TP/PP/DP), kernel fusion, and custom Triton kernels, bundling these optimizations into composable recipes for easy application across different models.