Lightning-AI/litgpt
20+ high-performance LLMs with recipes to pretrain, finetune and deploy at scale.
What it solves
LitGPT 嘗試簡化在大規模下預訓練、微調與部署大型語言模型(LLM)的流程。它提供一個高效能框架,去除複雜的抽象層,讓開發者能完整掌控模型實作,同時維持企業級的效能。
How it works
LitGPT 從頭實作超過 20 種流行的 LLM。它使用指令列介面(CLI)執行各種工作流程,例如 litgpt serve 用於部署、litgpt finetune 用於專門訓練、litgpt pretrain 用於初始訓練。框架透過 Flash Attention、FSDP 與量化(fp4/8/16/32)等技術優化效能,以降低 GPU 記憶體使用,並支援從 1 台到 1000+ 台 GPU/TPU 的擴展。
Who it’s for
此框架設計給需要高效能、最小抽象的開發者與企業,用於訓練、微調或部署 LLM,讓除錯與生產規模的最佳化更為容易。
Highlights
- Extensive Model Support: Supports 20+ LLMs including Llama 3, Gemma 2, Phi 4, and Qwen2.5.
- No Abstractions: Models are implemented from scratch in single files for easier debugging and better performance.
- Scalable Training: Supports FSDP and scaling across hundreds of GPUs/TPUs.
- Flexible Finetuning: Includes recipes for LoRA, QLoRA, and Adapter tuning.
- Integrated Evaluation: Built-in tools to evaluate model performance on tasks like MMLU and Truthful QA.