跳到正文
原文
Hacker News· baraa_·· 25 天前AI 评分42

在 TypeScript 中从零构建 LLM:Node.js 分章节实战指南

Show HN: Building an LLM from Scratch in TypeScript

AI 摘要

一份教程用 Node.js 和 TypeScript 从零实现大语言模型,逐章搭建数据集、dataloader、注意力机制、Transformer block、GPT 与训练循环,每章在 @node-llm/chapters 包中提供可运行入口,代码托管于 GitHub。后续将嵌入 @node-llm/playground 的 WebGPU 实时演示。 brief: yes

正文 · 原文

Building an LLM in NodeJS book cover

The from-scratch guide to building large language models in NodeJS and TypeScript.

Start with Chapter 2

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

00