# Lightning-AI/lightning-thunder

PyTorch compiler that accelerates training and inference. Get built-in optimizations for performance, memory, parallelism, and easily write your own.

Repository: https://github.com/Lightning-AI/lightning-thunder
Canonical: https://ross.abutalabs.com/products/lightning-thunder
Language: Python
License: Apache-2.0
License Family: permissive
Last push: 2026-08-24T21:17:16+00:00

## Health v2 (maintenance only)
Score: 72/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 41, longevity 64
- inputs: {"age_days": 898, "days_push": 9, "days_rel": 315, "gap_med": 43, "n_releases_24m": 6}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1469, forks 119 (observed 2026-08-28T04:04:49.024136+00:00)

## What it is
Lightning Thunder is a source-to-source deep learning compiler for PyTorch that optimizes models for training and inference. It provides a Pythonic IR, composable optimization transforms (fusion, quantization, distributed parallelism), and an extensible dispatch mechanism to fusers and optimized kernel libraries.

## Use cases
- speed up PyTorch model training and inference
- fuse PyTorch ops into optimized kernels
- quantize models to FP8/FP4 precision
- convert single-GPU models to distributed training
- profile and inspect PyTorch computation graphs
- write custom Triton kernels for PyTorch models
- avoid graph breaks when tracing PyTorch programs

## When to choose
- you want faster PyTorch execution without leaving Python
- you need composable, inspectable optimization recipes across model families
- you want to target new hardware like NVIDIA Blackwell with custom kernels
- you need distributed TP/PP/DP transforms applied programmatically

## When to avoid
- you need a battle-tested production compiler with broad ecosystem support (torch.compile)
- your models rely on ops Thunder does not yet cover
- you are not using PyTorch

## Facets
- artifact type: library
- maturity: active
- function: compiler, machine-learning, deep-learning, llm-inference, llm-training, gpu-computing, benchmarking
- domain: deep-learning, machine-learning, compilers, gpu-computing, large-language-models, performance
- platform: python, cross-platform
- tags: pytorch-compiler, kernel-fusion, quantization, distributed-training, triton, cuda-graphs, source-to-source, torch-compile-alternative, gpu, linux

## Member repositories
- Lightning-AI/lightning-thunder (main) score 72

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:49.024136+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:34:51.965651+00:00, confidence not recorded.
  - readme: https://github.com/Lightning-AI/lightning-thunder (fetched 2026-08-28T04:04:49.024136+00:00, sha 9b4e47b43751)
  - registry_pypi: https://pypi.org/pypi/lightning-thunder/json (fetched 2026-08-29T11:42:51.370064+00:00, sha 689a4cd3e793)
- Data as of 2026-08-30T08:39:29.467469+00:00.
