Repository navigation
Releases
From the First Token — First public reading edition
I put this book together while working through how language models are built, one piece at a time. The aim is to connect the equations with code you can run, check and change.
From the First Token is free to read. Read the book online, choose a PDF below, or download From-the-First-Token.zip for the book, illustrations, exercises, runnable example and teaching data.
The companion materials include 70 guided exercises, a complete CPU character-bigram example and 64 original synthetic documents. The exercises leave the core implementation to the reader; the complete example connects data loading, training, evaluation and generation.
All books · This book and the author's note
Book: CC BY-NC-ND 4.0. Teaching code and the identified synthetic fixtures: PolyForm Noncommercial 1.0.0. See the included license notices for details.
我在重新梳理语言模型各个环节的过程中,把这些解释、算例和代码整理成了《从第一个 Token 开始》。我希望读者能把公式和可以运行、检查、修改的代码连起来。
本书可免费在线阅读,也可以下载 PDF。完整的 From-the-First-Token.zip 还包含插图、70个引导式练习、可直接运行的 CPU 字符二元模型示例,以及64条原创合成教学文档。练习核心留给读者实现。
书稿采用 CC BY-NC-ND 4.0;教学代码和明确标识的合成样例采用 PolyForm Noncommercial 1.0.0。具体使用范围见包内许可声明。