Favicon of LitGPT

LitGPT

Open-source Python toolkit for training and serving LLMs on your own hardware, with Apache 2.0 licensing, quantization and multi-GPU support.

LitGPT is a Python toolkit for developers and researchers who want to train, adapt and serve language models on their own hardware or servers. Its model implementations are written directly, with little abstraction between you and the code, so you can inspect model behavior and modify it for research or custom applications. It's open source under Apache 2.0.

Supported models include Llama, Gemma, Phi 4 and Qwen3, alongside coding models such as Code Llama and Qwen2.5 Coder. You can fine-tune them on your own datasets, train a model from scratch or continue training an existing model on domain-specific text. Validated training recipes provide starting points for different training conditions. LoRA, QLoRA and adapters let you adapt models with fewer trainable parameters.

Hardware support covers a single GPU through distributed GPU clusters, as well as TPUs. Quantization and lower-precision computation reduce memory demands, including for inference on low-memory GPUs. Flash Attention, sharded training and optional CPU offloading support larger workloads.

The same toolkit handles interactive chat, benchmark evaluation with tasks such as MMLU and TruthfulQA, and self-hosted model APIs that websites or apps can call. It also exports model weights to other formats. Some model downloads require an access token. Lightning AI separately offers cloud GPU workspaces, training clusters and hosted inference; those workloads run on its cloud infrastructure rather than your own machine.

Similar to LitGPT