
Let’s Build a Transformer!
Cradle
A transformer, built one piece at a time in C#.
Explore the seriesThe series
4 of 18 lessons published
Start here · Prologue
Prologue: Getting the cradle ready
Set up the tools, build the starting program, and check the dependencies we’ll use in the first lesson.
Published ·
- The cradle Published ·
Run our first kernel on the GPU.
Read lesson - Buffers and shapes Published ·
Give the data a shape we can work with.
Read lesson - Matrix multiplication Published ·
Build the operation at the heart of the model.
Read lesson - Softmax Published ·
Turn scores into a stable distribution.
Read lesson
The approach
One program. Room to grow.
We begin with a kernel running on the GPU. Each lesson adds an operation we can inspect and test, until the same C# program loads model weights and generates text.
About the project