Sebastian Raschka

Sebastian Raschka, PhD, has been working in machine learning and AI for more than a decade. In addition to being a researcher, Sebastian has a strong passion for education. He is known for his bestselling books on machine learning with Python and his contributions to open source.

Sebastian is a staff research engineer at Lightning AI, focusing on implementing and training LLMs. Before his industry experience, Sebastian was an assistant professor in the Department of Statistics at the University of Wisconsin-Madison, where he focused on deep learning research. You can learn more about Sebastian at https://sebastianraschka.com.

books & videos by Sebastian Raschka

Master and Build Large Language Models

  • Course duration: 17h 15m

The best way to understand LLMs is to build one yourself. This course gives you that power.

In this engaging liveVideo, veteran AI researcher Sebastian Raschka leads you step by step through the inner workings of a large language model. You'll see and hear Sebastian talk you through each step of the LLM project you build in his bestselling book Build a Large Language Model (From Scratch).

In this liveVideo, you'll explore how to:

  • Plan and code all the parts of an LLM
  • Prepare a dataset suitable for LLM training
  • Fine-tune LLMs for text classification and with your own data
  • Use human feedback to ensure your LLM follows instructions
  • Load pretrained weights into an LLM

This liveVideo is the perfect orientation to LLMs for software engineers ready to lead AI initiatives or data scientists and ML researchers who want build or adapt their own LLMs.

This unique course also includes six essential prerequisite videos created by AI expert Abhinav Kimothi, author of A Simple Guide to Retrieval Augmented Generation. Abhinav delivers an insightful review of everything from the Python features you need to work on LLMs to advanced PyTorch operations, ensuring you can succeed regardless of your starting point.

Build a Reasoning Model (From Scratch)

  • MEAP began August 2025
  • Last updated August 2025
  • Publication in Summer 2026 (estimated)
  • ISBN 9781633434677
  • 375 pages (estimated)
  • printed in color

In Build a Reasoning Model (From Scratch), acclaimed ML research engineer Sebastian Raschka takes you inside the black box of reasoning-enhanced LLMs. You’ll start with a compact, pre-trained base model that runs on consumer hardware, then upgrade it step-by-step to tackle ever-more difficult problems and scenarios. You’ll measure its performance, add reasoning at inference time without training, and then improve it further with reinforcement learning. By the end of the book, you’ll have a small but capable reasoning stack built from the ground up!

Build a Large Language Model (From Scratch), Video Edition

  • Course duration: 9h 15m

Bestselling author Sebastian Raschka guides you step by step through creating your own LLM. Each stage is explained with clear text, diagrams, and examples. You’ll go from the initial design and creation, to pretraining on a general corpus, and on to fine-tuning for specific tasks.

Test Yourself on Sebastian Raschka's Build a Large Language Model (From Scratch)

  • December 2024
  • ISBN 9781638357629
  • 165 pages

Test your understanding and push your knowledge further with exercises drawn from the core concepts of the bestselling LLM book!

Sebastian Raschka’s bestselling book Build a Large Language Model (From Scratch). is the best way to learn how Large Language Models function. It uses Python and the PyTorch deep learning library. It’s a unique way to learn this subject, which some believe is the only way to truly learn: you build a model yourself.

Even with the clear explanations, diagrams, and code in the book, learning a complex subject is still hard. This Test Yourself guide intends to make it a little easier. The structure mirrors the structure of Build a Large Language Model (From Scratch), focusing on key concepts from each chapter. You can test yourself with multiple-choice quizzes, questions on code and key concepts, and questions with longer answers that push you to think critically. The answers to all questions are provided.

Depending on what you know at any point, this Test Yourself guide can help you in different ways. It will solidify your knowledge if used after reading a chapter. But it will also benefit you if you digest it before reading. By testing yourself on the main concepts and their relationships you are primed to navigate a chapter more easily and be ready for its messages.

We recommend using it before and after reading, as well as later when you have started forgetting. Repeated learning solidifies our knowledge and integrates it with related knowledge already in our long-term memory.

Build a Large Language Model (From Scratch)

  • September 2024
  • ISBN 9781633437166
  • 368 pages
  • printed in black & white
  • Available translations: Complex Chinese, German, Italian, Japanese, Korean, Polish, Russian, Simplified Chinese, Spanish

Build a Large Language Model (From Scratch) is a practical and eminently-satisfying hands-on journey into the foundations of generative AI. Without relying on any existing LLM libraries, you’ll code a base model, evolve it into a text classifier, and ultimately create a chatbot that can follow your conversational instructions. And you’ll really understand it because you built it yourself!

For deeper understanding and better learning we provide a built-in testing system into liveBook, the online version of this book. Separately, you can download a free PDF Test Yourself guide on this book from here.