Lightning-AI

litgpt: Train, Fine-Tune, and Deploy LLMs

LitGPT provides from-scratch implementations and training recipes for 20+ large language models, powered by Lightning Fabric from Lightning AI. Use its Python tools to pretrain, fine-tune, evaluate, and deploy models across single- or multi-device setups.

ActivePythonApache-2.0AILLMDeep Learning
Stars
13.7k
Forks
1.5k
Stars, last 30 days
+38
Last commit
today
Contributors
100+

Our take

Activeregular commits and releases

Health score

53/100

How it is scored
Activity
50
Community
89
Issues
41
Pull requests
30

+38 stars in the last 30 days

  • More contributors than 78% of the projects we track
  • Slower to merge pull requests than 97% of the projects we track

LitGPT is an actively maintained, Apache-licensed toolkit with broad model and training coverage, suited to teams that want hands-on control of LLM workflows in Python.

Good fit if

  • You need a shared tool for pretraining, fine-tuning, evaluation, and serving across its supported LLMs.
  • You value editable, from-scratch implementations and YAML recipes over a higher-level managed workflow.
  • Your team can work with Python 3.10 or newer and has suitable compute for the models and training jobs it plans to run.

Look elsewhere if

  • You need a hosted training or inference service rather than a toolkit to install and operate.
  • Your target model or workflow is not among LitGPT's supported implementations and recipes.
  • You require a tool that avoids model training infrastructure or exposes no configuration-level complexity.
All health signals
Last commit2026-11-10 (today)
Commits, last 90 days12
Releases, last 12 months3 (latest v0.5.14, 2026-11-10)
Contributors100+ (top contributor: 28% of commits)
Issues closed, last 90 days3 (typically closed in 31 days)
Pull requests merged, last 90 days11 (typically merged in 25 days)
Project age3 years

Checked on 2026-11-11 with the GitHub API.

Project history

Daily GitHub snapshots since Oct 7, 2026. History covers stars and forks; health signals are not tracked historically.

Selected snapshot

Stars

13,750

Forks

1,549

Change since Nov 15, 2026: +2 stars·0 forks

Overview

LitGPT is a Python toolkit for pretraining, fine-tuning, evaluating, and deploying more than 20 large language models. Built on Lightning Fabric from Lightning AI, it provides from-scratch model implementations and configurable recipes intended to give practitioners direct control over training and inference rather than hide those workflows behind abstraction layers.

It is aimed at developers and researchers who want one workflow for models such as Llama, Gemma, Phi, and Qwen, from experimenting on custom datasets to running a model behind an inference server. Its documented options include single-device runs and scaling across multiple GPUs or TPUs.

Key Features

  • CLI workflows for model download, chat, pretraining, continued pretraining, fine-tuning, evaluation, and serving.
  • From-scratch implementations of 20+ model families, with model configurations and training recipes.
  • Parameter-efficient fine-tuning with LoRA, QLoRA, and adapters.
  • Memory and compute options including quantization, low-precision training, Flash Attention v2, and CPU offloading.
  • Multi-GPU training through fully sharded data parallelism, plus TPU and XLA support.
  • Dataset options for common training tasks and custom data, including JSON instruction-tuning and text files.
  • Python API for loading and generating with a supported model.

Use Cases

  • A researcher wants to pretrain a small language model on custom text and inspect or modify the implementation.
  • An application team wants to adapt a supported pretrained model to a specialized dataset using LoRA or QLoRA.
  • A developer wants to evaluate a model on selected tasks or test it through interactive chat before integration.
  • An organization wants to serve a pretrained or fine-tuned checkpoint through an HTTP inference endpoint.

What you need

Detected in the repository

  • Python >=3.10 (from pyproject.toml)
  • A test suite and automated checks on GitHub Actions

License in plain words

Apache-2.0permissive

  • Commercial use: yes
  • Modify and redistribute: yes
  • You must keep: the license, the NOTICE file and a note of your changes
  • Share your changes: no
  • Includes an explicit patent grant from the contributors:

A summary, not legal advice: the LICENSE file is what applies.

Getting Started

Install the extra dependencies:

pip install 'litgpt[extra]'

Then load a supported model with the Python API or use the litgpt CLI. See the repository README for workflows, model details, and advanced installation options.

Alternatives

  • axolotl: Axolotl focuses on post-training, fine-tuning, and alignment, including LoRA, QLoRA, preference tuning, and reinforcement learning.
  • LlamaFactory: LlamaFactory offers CLI and web interfaces for fine-tuning, inference, and export across a broad range of language and vision models.
  • torchtune: torchtune provides editable, model-specific PyTorch recipes for LLM post-training, and is no longer actively maintained.
ProjectLanguageLicenseStarsStatus
litgptPythonApache-2.013.7kActive
axolotlPythonApache-2.012.6kActive
LlamaFactoryPythonApache-2.075.3kActive
torchtunePythonBSD-3-Clause5.8kQuiet

Considerations

Training and serving large models can require substantial compute and memory. LitGPT offers quantization, low-precision modes, and multi-device options, but the README does not specify a universal hardware minimum, so requirements depend on the model and workload. Some model downloads require access tokens. The project is active, with recent commits and releases and contributions from a broad contributor base; issue closure takes a median of about a month, which teams should account for when relying on community support. Apache-2.0 permits broad use, subject to its license terms.

Found this useful?

Share it with someone who would like litgpt.

Comparisons