Fine-tuning a Model for SQL

Fine-tune a model for SQL and check what improved

Train a model to write SQL queries that answer questions about a table, then check which answers improved on questions it never trained on, and which still fail.

Start lesson 1 →

The course, lesson by lesson

  1. Lesson 1

    Ask a pretrained model for SQL

    Open lesson →
  2. Lesson 2

    Turn examples into a learning signal

    Open lesson →
  3. Lesson 3

    Fine-tune with a small adapter

    Open lesson →
  4. Lesson 4

    Run and understand the training loop

    Open lesson →
  5. Lesson 5

    Decide whether fine-tuning helped

    Open lesson →

Download the optional SQL lab →

Find your way in

Six ways to learn AI · Karpathy study companion

ML reference slides · Python examples