• Docs >
  • Welcome to ⚡ Lightning

Welcome to ⚡ Lightning

Build models, ML components and full stack AI apps ⚡ Lightning fast.

Featured examples of what you can do with Lightning:

Build self-contained, components

Use Lightning, the hyper-minimalistic framework, to build machine learning components that can plug into existing ML workflows. A Lightning component organizes arbitrary code to run on the cloud, manage its own infrastructure, cloud costs, networking, and more. Focus on component logic and not engineering.

Use components on their own, or compose them into full-stack AI apps with our next-generation Lightning orchestrator.

Run an example component on the cloud:

Hello world
Hello GPU world
PyTorch & ⚡⚡⚡ Trainer (1+ cloud GPUs)
Train PyTorch (cloud GPU)
Train PyTorch (32 cloud GPUs)
Deploy a model on cloud GPUs
Run a model script
Streamlit demo
# app.py
from lightning.app import LightningWork, LightningApp

class YourComponent(LightningWork):
   def run(self):

component = YourComponent()
app = LightningApp(component)

Components run the same on the cloud and locally on your choice of hardware.

# install lightning
pip install lightning

# run the app on the --cloud (--setup installs deps automatically)
lightning run app app.py --setup --cloud

Explore pre-built community components in our gallery.