Show HN: Building an LLM from Scratch in TypeScript

baraa_ 32 points 3 comments October 14, 2026
book.humanexperiences.io · View on Hacker News

I wanted to understand transformers at a level where nothing is magic, so I'm building a ChatGPT-style model from first principles in TypeScript. Why not Python? I've found that reimplementing concepts in a different language forces me to grasp the nuance of the implementation. Chapters cover dataloaders, embeddings, and the attention mechanism so far. Feedback welcome if anything's unclear.

Discussion Highlights (1 comments)

pluc

Why does it start at Chapter 2? Is it one of those JavaScript integer quirks?

Semantic search powered by Rivestack pgvector
9,516 stories · 89,816 chunks indexed