litgpt

(★ 13,619)

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

File Explorer

  • .gitignore
  • .pre-commit-config.yaml
  • CITATION.cff
  • CODE_OF_CONDUCT.md
  • CONTRIBUTING.md
  • LICENSE.md
  • pyproject.toml
  • README.md

# Installation Guide

python
Prerequisites

Setup Steps

git clone https://github.com/Lightning-AI/litgpt

Clone the repository locally.

cd litgpt

Navigate to the project directory.

pip install 'litgpt[extra]'

Install LitGPT with extra dependencies.

Key Commands

pip install 'litgpt[extra]'

Install LitGPT package with extra features.

pip install -e '.[extra,compiler,test]'

Install the package in editable mode from source.

uv sync --all-extras

Sync all dependencies using the uv package manager.

Running in a GPU environment requires a CUDA driver compatible with PyTorch.

# Use via CDN

jsDelivr

jsDelivr serves any public GitHub repository as a CDN with zero setup. Pick a version and a file to get a ready-to-paste link and snippet.

Release Timeline

Actively Maintained

Command Glossary

Commands referenced in this DOCs, explained below.

🔍

git clone

View Details ▼

Clone an existing repository.

git clone {{remote_repository_location}} {{path/to/directory}}

Clone an existing repository into a new directory (the default directory is the repository name):

git clone --recursive {{remote_repository_location}}

Clone an existing repository and its submodules:

git clone {{[-n|--no-checkout]}} {{remote_repository_location}}

Clone only the `.git` directory of an existing repository:

🔍

pip install

View Details ▼

Install Python packages.

pip install {{package1 package2 ...}}

Install one or more packages:

pip install {{package1 package2 ...}} {{[-U|--upgrade]}}

Upgrade all specified packages to the latest version, installing any that are not already present:

pip install {{package}}=={{version}}

Install a specific version of a package:

🔍

uv sync

View Details ▼

Update the project's environment to match the lockfile.

uv sync

Sync the project environment with the lockfile:

uv sync --all-extras

Sync and include all optional dependencies:

uv sync --extra {{extra_name}}

Sync with specific optional dependencies:

// repository documentation