What problem does it solve?
Provides clean, single-file implementations and end-to-end training recipes for large language models so teams and researchers can understand architectures and run production-grade fine-tuning without heavy abstraction layers.
Core Features & Use Cases
- Readable model implementations: Single-file GPT-style models for many families (Llama, Gemma, Phi, Mistral, Qwen, Falcon) that make architecture changes and debugging straightforward.
- Fine-tuning workflows: Production-ready LoRA and QLoRA recipes, dataset formats, and merge/convert utilities for adapter training and deployment.
- Scaling & deployment: Guidance for FSDP multi-GPU training, quantization (4/8-bit), converting to GGUF, and serving via APIs for research prototypes or production services.
- Use case: Quickly prototype a LoRA fine-tune on microsoft/phi-2 for domain adaptation, merge adapters, quantize, and deploy a low-latency inference endpoint.
Quick Start
Install litgpt, download microsoft/phi-2, and run a LoRA fine-tune on data/my_dataset.json saving outputs to out/phi2-lora.