Lightning Thunder is a source-to-source compiler for PyTorch, developed by Lightning AI, that accelerates model training and inference by fusing and optimizing operations before execution. The open-source project has around 1,500 stars on GitHub and is under active development in 2026.
Thunder takes ordinary PyTorch code and compiles it into optimized programs, combining operations to reduce memory traffic and kernel-launch overhead. It works by tracing your program and distributing work across a set of executors, which can include cuDNN and cuBLAS for dense math, Triton for generated kernels, and PyTorch eager execution itself, and it composes with torch.compile rather than replacing your whole stack. A distinctive design goal is readability: Thunder exposes the generated code and intermediate representations so performance engineers can inspect exactly what will run, understand why it is fast or slow, and write their own optimizations and transforms. That makes it both a practical accelerator for common models and a research platform for compiler experiments. Released under the Apache-2.0 license, Thunder targets training and inference workloads where squeezing more throughput or lower memory use out of the same GPUs has direct cost impact.
Free. Lightning Thunder is open source under the Apache-2.0 license; there is no paid tier for the compiler itself.
PyTorch engineers and performance researchers who need more speed or lower memory from existing models and want a compiler they can inspect and extend.