Lightning-AI/pytorch-lightning — reverse-engineered prompt

Reverse engineered prompt

GitHub

Build me a Python library that makes training PyTorch models much easier, like a clean framework for researchers and AI builders who don’t want to rewrite the same training code every time.

I want users to define their model, training step, validation step, optimizer, and data, then hand it to a simple Trainer that handles the boring engineering parts like backprop, logging, checkpoints, mixed precision, CPU or GPU training, and scaling to multiple GPUs without changing the model code. Keep it flexible so advanced PyTorch users can still control the training loop when they need to.

Include a small expert mode layer like Fabric for people who want more manual control over distributed training. Add clear docs, examples, tests, and a quick start that trains a tiny MNIST autoencoder so someone can install it and run a working example right away.

Look up current PyTorch docs online if you need to.

Want more depth? Deep Reverse