LitGPT is Lightning AI’s open-source collection of more than 20 large language models implemented from scratch, with production-quality recipes to pretrain, fine-tune, and deploy them at scale. It is prized for readable, hackable code: no hidden abstraction layers between you and the model. The repository has earned more than 13,000 stars on GitHub and is actively maintained, with updates through late 2026.
Every model in LitGPT, from small GPT variants to leading open architectures, is implemented in clean single-file style so researchers can read, modify, and truly understand the code they train. The recipes cover the workflows practitioners actually need: full pretraining, instruction fine-tuning, LoRA and QLoRA adapters, and deployment, all driven by simple YAML configuration files and a unified command-line interface. Performance engineering is built in rather than bolted on: Flash Attention, FSDP sharding, mixed precision down to fp4 and fp8, and scaling from a single GPU to clusters of a thousand or more GPUs and TPUs. Checkpoints interoperate with the wider ecosystem, so you can load popular open weights, fine-tune them with LitGPT recipes, and export for serving. Tutorials and documentation target both beginners training their first model and teams running serious training jobs.
LitGPT itself is free and open source under the Apache 2.0 license, and you can run it entirely on your own hardware. It is maintained by Lightning AI, whose optional Lightning Cloud platform offers paid GPUs, clusters, and AI Studios if you want managed infrastructure, making the overall offering freemium.
LitGPT is for researchers, students, and ML engineers who want to train or fine-tune LLMs with code they can fully inspect and modify. It is equally good as a learning resource for understanding transformer internals and as a practical training stack for custom models.