Preface: Why This Book Exists¶
There's plenty of information available to learn about AI and LLMs. So why create another one?
Well, most either fall into one of three traps or lead you down a rabbit hole of tutorial hell.
Tutorial hell is a state of learning paralysis where you're constantly consuming content on how to code from others. You may feel as though you are learning, but you never build anything on your own. After running someone's code and getting a successful result, you feel good. Why did it work? Close your laptop and think about it, and you have no idea. You've been watching someone cook a hundred times, but you have not cooked anything yourself.
The three traps that lead there:
- Too shallow. You copy and paste the code and follow along. You produce an output, but you don't understand any of the decisions behind it, so the moment something breaks or changes, you're stuck.
- Too deep. These read like research papers, expect prior courses in linear algebra and calculus, and assume you already have a graduate-level background. Most readers bounce off in chapter two.
- Too demanding on hardware. The content can be great, but it assumes you have a modern GPU, a cloud computing account, and several dedicated weekends free, which rules out most people.
This book takes a different approach.
It's going to balance theory and code. There will be explanation so you can grasp what you're creating and why each piece is there. There will be code that you can run on your computer today.
Each chapter will be composed of an explanation with an analogy, followed by code that implements it and then a quick recap of the lesson. Nothing will be hand-waved. If there is code doing something, there will be a reason given in that chapter.
Today means on your computer. No GPUs or cloud providers needed. I have done this on a ThinkPad T14 Gen 1 (Intel Core i7, 32GB RAM, 2020). It's an old business laptop without a GPU. It took roughly 20-30 minutes to complete one full training run. So if it can run on my machine it will run on yours.
Python and PyTorch, that's it. No sign-ups.
Who Is This Book For?¶
Business students. You will be using AI tools on a weekly basis and will purchase them, oversee them or answer for them at some point in your career. You just want to understand what they are doing without a technical degree. I provided an image for each concept along with a real-life analogy and business scenario. All scripts are already coded. Just copy them, run them and understand what each line does. Then play with the values one at a time.
Beginners who learn by building. You know some Python, you're curious about AI, and using someone else's model isn't enough because you want to understand how it works. You want to go from zero to a working language model, line by line, without getting stuck in tutorial hell.
Instructors and professors. You want material ready for class, with concepts clear enough to teach, code that runs on a student's laptop in a single class session, and a structure that maps cleanly to a lecture. This book is designed for that. Every chapter has a lecture deck, a 15-minute assignment and a notebook that runs in a browser.
IT/IS professionals. You work with AI tools every day but want to understand what's happening inside them. You don't need a PhD for that, just a clear explanation of the architecture, a working example, and code you can read and modify.
Parents teaching their kids. If you want to show your child how AI works as well as how to use it, this book gives you a hands-on project you can work through together. Build something real, ask questions, and break it and fix it, because that is how learning sticks.
A Note on AI Assistance¶
This book was written by Truong (Jack) Luu. AI tools helped with writing plans, code drafts, and editing. All code was reviewed, edited, and tested by the author on a local machine. Every example in this book runs exactly as shown.
Truong (Jack) Luu jackluu.io