From text to a working model

Build an LLM from first principles

Follow small, executable examples until tensors, attention, training, and generation fit together as one Rust program.

Choose a course

LLM from scratch

Build the parts of a small language model in Rust, from tokenization to training and generation. Chapters 0–39.

Start LLM from scratch

Practical LLM in Rust

Extend the completed model with corpus preparation, efficient execution, and measured training and inference. Start with the course structure in Chapter 0.

Requires the basics from LLM from scratch or equivalent Rust and LLM experience.

Available in English

Start Practical LLM in Rust

Learn by running code

Every concept begins with a tiny Rust example and deterministic output.

Connect code to the formula

Symbols are introduced only when they explain the behavior you can observe.

See what came before

Each chapter contrasts the modern component with the historical approach it replaced.