[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-113444":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":13,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":13,"forks30d":13,"starsTrendScore":18,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":10,"pushedAt":25,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":13,"starSnapshotCount":13,"syncStatus":29,"lastSyncTime":30,"discoverSource":31},113444,"from-the-first-token","LonglongaaaGo\u002Ffrom-the-first-token","LonglongaaaGo","From the First Token: bilingual book, guided exercises, runnable examples and teaching data","https:\u002F\u002Flonglongaaago.github.io\u002Fbook\u002Ffrom-the-first-token\u002F",null,"Python",227,0,59,14,107,144,71,90,"Other",false,"main",true,[],"2026-11-15 18:33:46","2026-11-23 18:46:52","# From the First Token\n\n**[Read online](https:\u002F\u002Flonglongaaago.github.io\u002Fbook\u002Ffrom-the-first-token\u002F?lang=en#read-online)**\n\n[![GitHub Stars](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002FLonglongaaaGo\u002Ffrom-the-first-token?style=social)](https:\u002F\u002Fgithub.com\u002FLonglongaaaGo\u002Ffrom-the-first-token\u002Fstargazers)\n\n**Building Language Models from Scratch · Wanglong Lu · Public reading edition**\n\n[简体中文](README.zh-CN.md)\n\nThe book contains ten chapters and 71 sections, with reader PDFs, illustrations, and 70 numbered exercises with supplied checks.\n\nThe book and illustrations use **CC BY-NC-ND 4.0**; teaching code uses **PolyForm Noncommercial 1.0.0**. See [LICENSE.md](LICENSE.md) and [NOTICE.md](NOTICE.md) for the scope of each license.\n\n## Read and implement\n\nStart with the [English reading snapshot](book\u002Fen\u002Fmanuscript.md), with the [Chinese edition](book\u002Fzh-CN\u002Fmanuscript.md) alongside it. Follow [EXERCISES.md](EXERCISES.md) in numerical order. Section 03.04 is conceptual and has no separate exercise. Every assigned function is a fresh TODO, so this is not a complete solution package. Supplied drivers test the illustrated cases, not universal correctness. Later drivers can stop in an unfinished prerequisite.\n\nThe exercise baseline is Python 3.11, PyTorch 2.0.0 and NumPy 1.x. CPU execution is sufficient. From this package's root:\n\n```sh\npython3.11 -m venv .venv\nsource .venv\u002Fbin\u002Factivate\npython -m pip install -r requirements.txt\npython exercises\u002F01_01_text_to_tokens.py --check encode\n```\n\nThe first run raises `NotImplementedError`, the exercise's starting point. Read the contract and hints, implement the region marked `START LEARNER CODE`, and rerun the check. If a later exercise reports an unfinished prerequisite, complete that earlier assignment first. All supplied examples run on CPU.\n\n## Runnable teaching example and paired data\n\nThe package also includes a complete CPU example and paired synthetic data. Read [the English walkthrough](examples\u002FREADME.md), with [Simplified Chinese](examples\u002FREADME.zh-CN.md) alongside it, then run:\n\n```sh\npython tools\u002Fcheck_package.py\npython examples\u002Fgenerate_teaching_data.py --check\npython examples\u002Ftrain_bigram.py --check\n```\n\nThe package check prints `status: PASS` on success. The 76 assigned functions remain TODOs; the complete example supplies its own implementation. This example uses one character of context. See [the data guide](examples\u002Fdata\u002FREADME.md) for its source, generator and fixed split.\n\nThe integrity check applies to the files as downloaded. After implementing an exercise, use that exercise's supplied check driver.\n\n## Questions and corrections\n\nFor corrections or questions, include the relevant chapter or exercise.\n\n[Project and feedback](https:\u002F\u002Fgithub.com\u002FLonglongaaaGo\u002Ffrom-the-first-token\u002Fissues)\n\n## Reader PDF downloads\n\nThis GitHub source tree keeps large PDFs in the versioned release assets. The complete ZIP and both PDFs belong to the same companion release.\n\n- [English PDF](https:\u002F\u002Fgithub.com\u002FLonglongaaaGo\u002Ffrom-the-first-token\u002Freleases\u002Fdownload\u002Fv0.2.4-teaching.1\u002FFrom-the-First-Token-English.pdf)\n- [简体中文 PDF](https:\u002F\u002Fgithub.com\u002FLonglongaaaGo\u002Ffrom-the-first-token\u002Freleases\u002Fdownload\u002Fv0.2.4-teaching.1\u002FFrom-the-First-Token-Chinese.pdf)\n","这是一个面向初学者的动手实践型语言模型原理教学项目，通过双语教材、分步引导练习和可运行示例，系统讲解从零构建语言模型的核心概念与实现细节。项目包含10章71节内容、70个带验证机制的编程练习（基于Python\u002FPyTorch\u002FNumPy），以及一个完整的CPU可运行大模型教学示例（如bigram训练）和配套合成教学数据。所有代码均标注清晰的待实现区域（TODO），强调理解而非黑盒调用，适合高校课程辅助教学、自学入门及LLM底层原理培训场景。",2,"2026-11-24 04:45:54","CREATED_QUERY"]