7 本免费书,教你构建 AI 系统

构建一个 AI 智能体很容易。构建一个真正能在生产环境中运行的智能体则不然。这 7 本免费书籍涵盖了你实现这一跨越所需的工程知识。
作者:Kanwal Mehreen,KDnuggets 技术编辑兼内容专家,2026 年 11 月 12 日,人工智能
当有人问我:“你能仅凭 vibe coding 构建一个 AI 应用吗?”我的回答是,你很可能可以。但构建一个能用的应用是一回事。构建一个能够处理百万级请求而不会变得太慢或太昂贵的 AI 系统则是另一项挑战。
AI 工程远不止确保你的模型给出正确答案或完成任务。你需要考虑推理延迟、GPU 内存、部署、上下文管理,以及当你的应用开始获得超出预期的流量时会发生什么。如果你在构建 AI 智能体,事情会变得更加复杂。
也有一些不错的课程涵盖这些概念,但如果你真的想打好基础,我建议深入阅读书籍。你也不一定非要花钱买它们。我整理了 7 本我认为值得一读的免费书籍。有些书比较旧,你可能已经听说过,而另一些则较新。那么,让我们开始吧。
1. Chip Huyen 的《Machine Learning Systems Design》
这本书是经典之作,也很适合初学者,所以我会从这本开始。它把机器学习视为一个端到端问题,涵盖四个主要阶段:1)项目设置,2)准备数据管道,3)建模(选择、训练和调试),4)服务(测试、部署和维护)。每个阶段都附有实践资源的链接,以及大型科技公司机器学习工程师的案例研究。另一个优点是,书末有 27 道系统设计题可供练习。自 2019 年以来,很多东西都变了,所以它没有深入涉及大语言模型(LLM)基础设施,但对于理解机器学习系统各部分如何衔接,它仍然很有用。
2. 《Machine Learning Engineering Open Book》,作者 Stas Bekman
与其说这是一本可以从头读到尾的书,不如说它更像一本参考手册。它基于 Stas Bekman 在 BLOOM-176B 和 IDEFICS-80B 等大模型项目中的经验,涵盖 GPU 硬件、网络、存储、SLURM 编排、训练、推理和调试。我会把它加入书签,以便在遇到 GPU 显存不足(out-of-memory)报错或多节点训练缓慢之类的问题时查阅。该项目的 GitHub 仓库有近 20,000 个 star,并以 CC BY-SA 4.0 许可协议发布,因此可以免费阅读和分享。
3. 《AI Agents in Depth: Design Principles and Engineering Practice》,作者李博杰
如果你正在构建 AI 智能体,我绝对推荐你看看这本。它从一个简单的理念开始:智能体就是 LLM、上下文和工具。由此展开,它涵盖了上下文工程、记忆、检索增强生成(RAG)、工具集成和多智能体系统,并解释了处理更长、更复杂任务的智能体背后的工程决策。它还包含大量实践实验。Bojie Li 还有另一本书《Understanding AI Infra》,我非常喜欢,所以也在这里分享。
4. 《The Architecture of AI Agents and LLM Systems》,作者 Aleksandr Drobiazkin
这是一本新得多的书,专门聚焦于构建 LLM 应用。它涵盖了语言模型如何工作、上下文工程、RAG、结构化输出、工具调用以及不同的智能体架构。它还深入工程方面,如评估、可观测性、安全性、推理成本和延迟。它不只是展示如何使用某个框架,还解释了不同方法之间的权衡。它还有配套课程。
5. 《Inference Engineering》,作者 Philip Kiely
如果你对部署 LLM 并让它们更快、更便宜感兴趣,这可能是这份清单上最相关的书之一。它完整梳理了整个推理栈,从 GPU 和模型架构到服务软件与生产部署。你将了解批处理、量化、内存占用和延迟,以及如何选择合适的硬件或服务配置。如果你在试验本地 LLM 或 vLLM 之类的引擎,我会推荐它。它还解释了为什么一个模型对单个用户运行良好,但当数百个请求同时涌来时就开始吃力。
6. 《LLM Inference Illustrated》,作者 Ted Kyi
如果你想理解 LLM 生成回复时内部发生了什么,这本书非常值得一读。它还配有大量详细图示,因此对视觉型学习者也很友好。书中先讲清 Token 是如何逐个生成的,接着介绍推理系统如何让这一过程更快、更省内存、并具备可扩展性。它不会把模型服务当作黑箱,而是让你更清楚地理解那些让 LLM 得以高效服务的工程技巧。
7.《How to Scale Your Model》,作者 Jacob Austin 等人。
这本书出自 Google DeepMind 的研究人员之手。如果你想理解 LLM 如何在数千个加速器上训练和服务,我强烈推荐它。它从 TPU 的工作原理讲起,然后深入介绍其架构、内存带宽、模型分片、分布式训练和推理优化。我特别喜欢的一点是,它用 LLaMA 3 作为实际案例,说明训练或服务一个大模型需要多少内存、算力和资金。其中一些数学推导可能相当技术化,但它依然是一份极好的资料。
你不必把这七本书从头到尾全部读完。挑那些与你手头工作相关的书来读,其余的等需要时再回头翻看。
我认为我们正走到这样一个节点:几乎任何人都能借助编码智能体构建 AI 应用。但知道如何让这个应用可靠、快速、安全且成本可控,才是把能跑通的 demo 与生产系统区分开来的关键。
而这正是我认为学习 AI 系统工程正变得越来越重要、而非越来越不重要的原因。
Kanwal Mehreen 是一名机器学习工程师和技术作家,对数据科学以及 AI 与医学的交叉领域怀有深厚的热情。她合著了电子书《用 ChatGPT 最大化生产力》。作为 2022 年 Google Generation Scholar(亚太区),她倡导多元化和学术卓越。她还被认定为 Teradata Diversity in Tech Scholar、Mitacs Globalink Research Scholar 和 Harvard WeCode Scholar。Kanwal 是变革的热心倡导者,她创立了 FEMCodes,以赋能 STEM 领域的女性。
译文由英文原文机器翻译,术语按行业惯例统一,可在文末展开原文核对。
查看英文原文(7 FREE Books to Learn About Building AI Systems)
Building an AI agent is easy. Building one that actually works in production is not. These 7 free books cover the engineering knowledge you need to make that jump.
By Kanwal Mehreen, KDnuggets Technical Editor & Content Specialist on November 12, 2026 in Artificial Intelligence

When someone asks me, "Can you build an AI application just by vibe coding?" my answer is yes, you probably can. But building an application that works is one thing. Building an AI system that can handle a million requests without becoming too slow or too expensive is a different challenge.
There is a lot more to AI engineering than making sure your model gives the right answer or completes the task. You need to think about inference latency, GPU memory, deployment, context management, and what happens when your application starts getting more traffic than you expected. If you're building AI agents, things get even more complicated.
There are some good courses that cover these concepts too, but I'd recommend reading books in depth if you really want to build your fundamentals. You don't necessarily have to pay for them either. I've gathered 7 FREE books that I feel are worth reading. Some are older and you may have already heard of them, while others are newer. So, let's get started.
1. Machine Learning Systems Design by Chip Huyen
This book is one of the classics and is good for beginners, so I'd start with this one. It treats machine learning as an end-to-end problem and covers its four main stages: 1) project setup, 2) preparing data pipelines, 3) modeling (selecting, training, and debugging), and 4) serving (testing, deploying, and maintaining). Each stage includes links to practical resources and case studies from machine learning engineers at large tech companies. Another good thing is that it has 27 system design questions at the end for practice. A lot has changed since 2019, so it doesn't go deep into large language model (LLM) infrastructure, but it's still useful for understanding how machine learning systems fit together.
2. Machine Learning Engineering Open Book by Stas Bekman
This is more of a reference than a book you read from start to finish. It's based on Stas Bekman's experience with large model projects like BLOOM-176B and IDEFICS-80B, and it covers GPU hardware, networking, storage, SLURM orchestration, training, inference, and debugging. I'd keep it bookmarked for when you run into problems like GPU out-of-memory errors or slow multi-node training. The GitHub repository has nearly 20,000 stars, and it's distributed under a CC BY-SA 4.0 license, so it's free to read and share.
3. AI Agents in Depth: Design Principles and Engineering Practice by Bojie Li
If you're building AI agents, I'd definitely recommend checking this one out. It starts with a simple idea: an agent is an LLM, context, and tools. From there, it covers context engineering, memory, retrieval-augmented generation (RAG), tool integration, and multi-agent systems, and it explains the engineering decisions behind agents that handle longer, more complicated tasks. It also comes with lots of practical experiments. Bojie Li has another book, Understanding AI Infra, which I really like, so I'm sharing it here too.
4. The Architecture of AI Agents and LLM Systems by Aleksandr Drobiazkin
This is a much newer book that focuses specifically on building LLM applications. It covers how language models work, context engineering, RAG, structured outputs, tool calling, and different agent architectures. It also goes into the engineering side, like evaluation, observability, security, inference costs, and latency. Instead of just showing you how to use a framework, it also explains the trade-offs between approaches. It also has a companion course.
5. Inference Engineering by Philip Kiely
This is probably one of the most relevant books on this list if you're interested in deploying LLMs and making them faster and cheaper. It walks through the whole inference stack, from GPUs and model architectures to serving software and production deployments. You'll learn about batching, quantization, memory usage, and latency, and how to choose the right hardware or serving setup. I'd recommend it if you're experimenting with local LLMs or engines like vLLM. It also explains why a model can run fine for one user but start struggling when hundreds of requests hit it at once.
6. LLM Inference Illustrated by Ted Kyi
This book is really good if you want to understand what happens when an LLM generates a response. It's also full of detailed diagrams, so it works well if you learn better visually. It walks through how tokens get generated one at a time, then covers how inference systems make that faster, lighter on memory, and able to scale. Instead of treating model serving as a black box, you'll get a clearer understanding of the engineering techniques that make it possible to serve LLMs efficiently.
7. How to Scale Your Model by Jacob Austin et al.
This book comes from researchers at Google DeepMind, and I'd highly recommend it if you want to understand how LLMs are trained and served across thousands of accelerators. It starts with how TPUs work and then goes into their architecture, memory bandwidth, model sharding, distributed training, and inference optimization. One thing I really like is that it uses LLaMA 3 as a practical example to explain how much memory, computing power, and money you need to train or serve a large model. Some of the math can get quite technical, but it's a great resource nonetheless.
You don't have to read all seven books from beginning to end. Pick the ones that match what you're working on, and come back to the rest when you need them.
I think we're reaching a point where almost anyone can build an AI application with the help of coding agents. But knowing how to make that application reliable, fast, secure, and affordable is what separates a working demo from a production system.
And that's exactly why I think learning AI systems engineering is becoming more important, not less.
Kanwal Mehreen is a machine learning engineer and a technical writer with a profound passion for data science and the intersection of AI with medicine. She co-authored the ebook "Maximizing Productivity with ChatGPT". As a Google Generation Scholar 2022 for APAC, she champions diversity and academic excellence. She's also recognized as a Teradata Diversity in Tech Scholar, Mitacs Globalink Research Scholar, and Harvard WeCode Scholar. Kanwal is an ardent advocate for change, having founded FEMCodes to empower women in STEM fields.
原文为英文,正文由自动抓取并保留原文。
原文发布于 KDnuggets(7 FREE Books to Learn About Building AI Systems),标题、摘要与正文由机器翻译,术语按行业惯例统一,未经人工逐句校订。