Lightning-AI/litgpt ? reverse-engineered prompt

Reverse engineered prompt

Build me a Python library for working with large language models that lets me pretrain, fine tune, and run inference on a bunch of popular open models like Llama, Gemma, Qwen, Phi, and Code Llama.

I want it to be fast and lightweight, with straightforward code that is easy to debug and does not hide everything behind a lot of layers. It should support things like low memory loading, quantization, LoRA and QLoRA style finetuning, and distributed training when needed, so it can work from a single GPU up to larger multi GPU setups.

Please include a simple way to load a model and generate text, plus recipes or configs for common training and finetuning workflows. If you need to check the latest model or training docs online, go ahead and do that. Make it feel polished, documented, and ready for real use by someone who wants to get started quickly.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab