nowfound

AI · October 14, 2026

Building an LLM from Scratch in TypeScript

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

Building an LLM from Scratch in TypeScript launched on October 14, 2026 with 33 votes, #506 of 3,223 launches that month and more than 95% of that year's launches.

In plain words

Building an LLM from Scratch in TypeScript is a guide for learning how large language models work by constructing one from the ground up using Node.js and TypeScript. The book covers each component sequentially, including attention mechanisms, transformer blocks, GPT architecture, and training loops. It is designed for developers who want to understand LLM internals through hands-on implementation. Each chapter includes runnable code examples available on GitHub, and the companion playground package provides interactive WebGPU demonstrations.

written from the facts on this page · October 2026

From the sources

Learn how large language models actually work by building one from scratch in Node.js and TypeScript. We’ll build every layer, from attention mechanisms to the training loop. Dataset, dataloader, attention, transformer block, GPT, and the training loop built up chapter by chapter. Every chapter has a runnable entry point in the @node-llm/chapters package, all on GitHub . Live WebGPU demos from the @node-llm/playground package are embeddedfrom book.humanexperiences.io

Does a similar job

all alternatives →
  • I built a tiny LLM to demystify how language models workApr 2026 · github.com · ▲915

    Built a ~9M param LLM from scratch to understand how they actually work. Vanilla transformer, 60K synthetic conversations, ~130 lines of PyTorch. Trains in 5 min on a free Colab T4. The fish thinks the meaning of life is food. Fork it and swap the personality for your own character.

  • LLMs can generate valid JSON 100% of the time2023 · github.com · ▲854

    Outlines is a Python library that focuses on text generation with large language models. Brandon and I are not LLM experts and started the project a few months ago because we wanted to understand better how the generation process works. Our original background is probabilistic, relational and symbolic programming. Recently we came up with a fast way to generate text that matches a regex (https://blog.normalcomputing.ai/posts/2023-07-27-regex-guide...). The basic idea is simple: regular expressions have an equivalent Deterministic-Finite Automaton (DFA) representation. We…

  • LangSmith2023 · langchain.com · ▲350

    Build and deploy LLM applications with confidence

  • HL
    How LLMs Work – Interactive visual guide based on Karpathy's lectureApr 2026 · ynarwal.github.io · ▲245

    All content is based on Andrej Karpathy's "Intro to Large Language Models" lecture (youtube.com/watch?v=7xTGNNLPyMI). I downloaded the transcript and used Claude Code to generate the entire interactive site from it — single HTML file. I find it useful to revisit this content time to time.

  • PT
  • LLM, a Rust Crate/CLI for CPU Inference of LLMs (LLaMA, GPT-NeoX, etc.)2023 · github.com · ▲45

    G'day, HN! I'm one of the maintainers of `llm`. I've been working alongside a trusty group of contributors to bring this project to life, and we're now at a point where we're ready to share it with the world. Large language models (LLMs) are taking the computing world by storm due to their emergent abilities that allow them to perform a wide variety of tasks, including translation, summarization, code generation, and even some degree of reasoning. However, the ecosystem around LLMs is still in its infancy, and it can be difficult to get started with these models. `llm` is a one-stop shop for…

More ai this month

the category →
  • Video model that turns script into viral social media videos

    AI · 17d ago · spira.ai

  • The browser where Claude Code and Codex work beside you

    AI · 17d ago · rill.love

  • Kolibri is Aleph Alpha

    AI · 18d ago · tej.as

  • Paintings by AI models: programs run through a simulation of oil paint.

    AI · 20d ago · stillwet.art

  • Onepin▲384

    AI voiceover with every name, price and date said right

    AI · 30d ago · onepin.ai

  • A real-time world model you can explore and change

    AI · 29d ago · world.pixverse.video

Launched alongside, October 2026

the whole month →