LM from First Principles
Description
Welcome to the Leanpub Launch video for LM from First Principles: A Notebook-Driven Guide to Building and Deploying Language Models https://leanpub.com/lmfp by Amarpreet Singh Bassan! 0:00 Amarpreet introduces himself and his background in technology, data, and AI systems 1:40 The motivation behind the book: going from raw text to language models step by step from first principles 2:28 The five-step methodology: build, observe, measure, research, engineer 3:14 Who the book is for: software engineers, data scientists, and students who want to go deeper than API calls 4:47 Starting with the Shakespeare corpus to show how text must be converted to numbers 5:39 Clarifying the common misconception that language models 'understand' language — they assign probabilities to sequences 6:30 Chapter one's bigram model: predicting the next character from a single character using simple Python 8:05 The progression through encoding, vector representations, batching, and self-attention toward the attention paper 8:52 How Interlude 2 was added in response to reader feedback to break down a dense paragraph 9:37 The iterative, community-driven improvement of the book enabled by the LeanPub publishing model About the Book LM from First Principles is a notebook-driven guide to building and deploying language models from the ground up. Starting from a 9,025-parameter bigram that predicts one character at a time, each chapter adds one layer of capability — feedforward context, sampling strategies, self-attention, scaling — until you have a model you can push to Hugging Face. Every concept is grounded in a runnable Jupyter notebook, so you do not just read about how language models work; you watch them train, fail, improve, and generate. The book is written for practitioners who want to understand what is happening inside the model, not just call an API. You need Python and curiosity. Everything else is built from first principles. About the Author Amarpreet Singh Bassan is a senior software engineer with 19 years of experience building reliable software systems. His current work focuses on production debugging and improving the reliability of production systems at scale. Outside of his core engineering work, he builds open-source proof-of-concept projects to explore AI engineering, agentic workflows, memory, observability, grounded retrieval, and practical debugging support. He is an IEEE Senior Member and writes about his learning journey in software engineering, AI systems, and reliable production architecture. Thank you for watching, please like and leave a comment, we'd love to hear from you! Please Subscribe and Follow! YouTube: https://www.youtube.com/leanpub X: https://x.com/leanpub Instagram: https://www.instagram.com/leanpub Facebook: https://www.facebook.com/leanpub Create Your Own Leanpub Book! You can create your own book anytime here: https://leanpub.com/create/book Here's the tutorial showing how to write and publish a Leanpub book in your browser (it's free!): https://help.leanpub.com/en/articles/2932527-getting-started-writing-a-book-in-leanpub-s-web-browser-writing-mode If you're a Leanpub author and you'd like to submit your own Launch video for us to publish, or if you'd like to record a Launch video with Len, please go here: https://leanpub.com/launch. #books #leanpublishing #selfpublishing #leanpub #writing #AIProgrammingwithPython #languagemodels #LLM #deeplearning #JupyterNotebooks #NLP
