Ahead of AI logo

Sebastian Raschka Β· Learn by building

Super Intelligence (SI)
From Scratch

I like to understand a model by implementing it. This page collects my from-scratch material, from neural networks and LLMs to reasoning methods and coding agents.

Start with the books

All my books

Where to begin? Start with the LLM book for the full implementation path. The reasoning book can also be read independently. Both have freely available code and exercises.

Courses and code-along videos

Follow along as I build LLMs and reasoning models, and explore how to implement open-weight architectures.

Browse all courses

LLM building blocks

Start with text data and attention. Then explore the components used in more recent architectures.

Essentials

Advanced concepts

Browse the architecture concept guides

Model implementations

Follow the changes from the book's GPT model to other LLM families. These implementations include code for loading pretrained weights.

Compare models in the LLM Architecture Gallery

Training and finetuning

Train a model, adapt it to a task, and inspect the code that makes the training loop work.

All chapter code, exercises, and supplementary material

Reasoning and evaluation

Build on a pretrained LLM to evaluate its responses and implement methods for improving reasoning.

Complete list of reasoning model code, exercises, and bonus materials

Coding agents and applications

Embed an LLM in a computing environment.

Machine learning foundations

Earlier tutorials and notebook collections covering the ideas behind neural networks and classical machine learning. Some examples use older library versions.

Browse the machine learning notebook archive