# Lightning-AI/litgpt

20+ high-performance LLMs with recipes to pretrain, finetune and deploy at scale.

Repository: https://github.com/Lightning-AI/litgpt
Canonical: https://ross.abutalabs.com/products/litgpt
Homepage: https://lightning.ai
Language: Python
License: Apache-2.0
License Family: permissive
Topics: ai, artificial-intelligence, deep-learning, large-language-models, llm, llm-inference, llms
Last push: 2026-08-17T10:24:35+00:00

## Health v2 (maintenance only)
Score: 93/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 90, longevity 86
- inputs: {"age_days": 1217, "days_push": 16, "days_rel": 65, "gap_med": 16, "n_releases_24m": 16}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 13629, forks 1488 (observed 2026-08-28T04:11:04.432841+00:00)

## What it is
LitGPT is a Python library providing from-scratch, hackable implementations of 20+ open-source large language models with recipes for pretraining, finetuning (LoRA, QLoRA, adapters), and deployment at scale. It supports distributed training on 1-1000+ GPUs/TPUs with features like Flash attention, FSDP, and fp4/8/16/32 quantization.

## Use cases
- finetune an open-source LLM with LoRA or QLoRA
- pretrain a large language model from scratch on multiple GPUs
- run fast LLM inference locally
- deploy a finetuned LLM as an API
- reduce GPU memory usage with quantization
- read clean from-scratch transformer implementations for learning
- scale LLM training across hundreds of GPUs

## When to choose
- you want full control and readable, abstraction-free LLM code
- you need to pretrain or finetune LLMs at scale with FSDP
- you want Apache-2.0 licensed enterprise-ready LLM tooling
- you want to experiment with many open LLM architectures in one library

## When to avoid
- you just want a plug-and-play inference server with the widest model coverage
- you need a high-level API with minimal configuration
- you are not working with PyTorch or GPUs

## Facets
- artifact type: library
- maturity: active
- function: llm-training, llm-inference, machine-learning, deep-learning, cli
- domain: large-language-models, deep-learning, machine-learning, artificial-intelligence
- platform: python, cli, cross-platform
- tags: pytorch, finetuning, pretraining, lora, flash-attention, fsdp, model-deployment, open-source-llms, gpu

## Member repositories
- Lightning-AI/litgpt (main) score 93

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:04.432841+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-29T17:13:09.190799+00:00, confidence not recorded.
  - readme: https://github.com/Lightning-AI/litgpt (fetched 2026-08-28T04:11:04.432841+00:00, sha 1bbd861fefbd)
  - homepage: https://lightning.ai (fetched 2026-08-29T08:07:41.242019+00:00, sha 21f0a0890a80)
  - registry_pypi: https://pypi.org/pypi/litgpt/json (fetched 2026-08-29T08:07:41.251784+00:00, sha 501fc1ce43d1)
- Data as of 2026-08-30T08:39:29.467469+00:00.
