File size: 598 Bytes
53e0dae | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | ## Minimal PyTorch Lightning Trainer Example
The script in this folder provides minimal examples showing how to train a LitGPT model using LitGPT's `GPT` class with the [PyTorch Lightning](https://github.com/Lightning-AI/pytorch-lightning) Trainer.
You can run the scripts as follows:
 
## Small 160M model:
```bash
# Download the Pythia model
litgpt download EleutherAI/pythia-160m
python litgpt_ptl_small.py
```
 
## Medium-sized 8B model:
```bash
# Download the Llama 3.1 model
litgpt download meta-llama/Meta-Llama-3.1-8B --access_token hf_...
python litgpt_ptl_medium.py
```
|