Back to directory

LitGPT

A library of more than 20 large language models implemented from scratch in plain PyTorch, with recipes to pretrain, fine-tune and deploy them at any scale from one GPU to a thousand.

LitGPT

LitGPT provides more than 20 large language models, including the Llama 3 family, implemented from scratch in plain PyTorch with no hidden abstraction layers, alongside recipes to pretrain, fine-tune and deploy them. Each model can be loaded and run in a few lines of code, and supports flash attention, fully sharded data parallel training, and parameter-efficient fine-tuning methods such as LoRA, QLoRA and adapters.

It supports quantization down to 4-bit precision to reduce GPU memory use, and the same recipes scale from a single GPU up to more than a thousand GPUs or TPUs. Models are installed with pip, and the full source can also be built from a local clone.

It is Apache 2.0 licensed for unrestricted commercial use, and is maintained by Lightning AI, whose separate cloud platform offers GPU workspaces, training and inference clusters, and hosted notebooks for the same workflows.

More in Models

See all 405
  • mini-AGI

    github.com

    A continual learning language model that trains from scratch on a single 8 GB VRAM GPU, assembling its own architecture and adapting its size to the hardware and data available rather than shipping as a fixed pretrained model.

  • An open-source contrastive-embedding pipeline that maps technical CVE vulnerability descriptions to formal cybersecurity compliance controls in NIST SP 800-53 and CMMC, published with its model generation, fine-tuning and evaluation code.

  • peekaboolean

    github.com

    A small vision-language model, fine-tuned with LoRA on a 500-million-parameter backbone, that answers typed multiple-choice, ordinal-score and yes/no questions about an image with calibrated probabilities, in about 400 milliseconds on a laptop.