---
name: "litgpt-clean-hackable-pretraining"
description: "Pretrain, evaluate, and fine-tune open language models with clean, readable PyTorch code."
metadata:
  author: "Lightning AI"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "pretrain model with litgpt"
  - "fine tune with litgpt"
  - "download and run litgpt weights"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# LitGPT Minimalist Hackable LLM Pretraining

Develops LLMs with Lightning AI LitGPT: zero-boilerplate model architectures, pretraining scripts, flash attention integration, LoRA fine-tuning, and quantized model deployments.

## When to Invoke
Invoke this skill whenever you need to:
- pretrain model with litgpt
- fine tune with litgpt
- download and run litgpt weights

## Execution SOP & Rules
1. Download model weights cleanly using litgpt download <repo/model>.
2. Run fine-tuning using litgpt finetune_lora <model> --data <data_path>.
3. Inspect and customize model architecture directly in clean, unencumbered PyTorch files.
4. Serve models with litgpt serve <model> for instant local testing.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
