用 TypeScript 从零构建大语言模型的分章节指南
Show HN: Building an LLM from Scratch in TypeScript
《Building an LLM from Scratch in TypeScript》是一份在 Node.js 与 TypeScript 中从零搭建大语言模型的分章节指南,逐章覆盖数据集与 dataloader、注意力机制、Transformer block、GPT 与训练循环。
原文逐章给出从注意力机制到训练循环的可运行实现路径,读者可以跟着把 Transformer 的每一层都搭起来。

The from-scratch guide to building large language models in NodeJS and TypeScript.
Learn how large language models actually work by building one from scratch in Node.js and TypeScript.
No black boxes
We’ll build every layer, from attention mechanisms to the training loop.
From scratch
Dataset, dataloader, attention, transformer block, GPT, and the training loop built up chapter by chapter.
Runnable
Every chapter has a runnable entry point in the @node-llm/chapters package, all on
GitHub.
Interactive
Soon
Live WebGPU demos from the @node-llm/playground package are embedded throughout.
来源:Hacker News · book.humanexperiences.io