From CUDA to LLM
Free preview
From CUDA to LLM

From CUDA to LLM

Build a language model from scratch, in pure C and CUDA. No Python, no PyTorch, no frameworks.

Chapter 1
A Thousand Hands
Chapter 2
First Light

You start with how a GPU really thinks, then write your very first CUDA program and put ten thousand threads to work. From here the book builds every piece of a working GPT by hand, one kernel at a time, and ends the evening the machine writes its first line of Shakespeare.

This is a free look at the first two chapters. The full book has 22 chapters and three parts, told as a story set in a small gurukul in the hills, where a teacher and three students teach a donated computer to write.
Start reading →