---
agent:
  instructions: "Use this search API to find apps, tools and games built with AI across this catalog with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://justbuildapps.com/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://justbuildapps.com/for-agents"
---

# Microgpt-ts

> I ported Karpathy's microgpt \[1\] to TypeScript.

Page: https://justbuildapps.com/app/11364 · Markdown: https://justbuildapps.com/app/11364.md

I ported Karpathy's microgpt \[1\] to TypeScript. It implements a complete GPT-2 architecture (autograd, tokenizer, multi-head attention, RMSNorm, and Adam optimizer), all in ~500 lines with zero runtime dependencies. It runs natively in the browser, no Python runtime or backend needed. You can try it in the playground: https://microgpt-ts.vercel.app/playground There are preset datasets (baby names, Pokemon, company names, movie titles, etc.) or you can paste your own text. The playground shows live loss curves as the model trains, and you can step through generation one token at a time to see the probability distribution at each step. One difference from Karpathy's original is style. His microgpt is a single Python script optimized for brevity. This version splits the code into a few small files, types everything, and uses named helper functions (dotProduct, transpose, mean) instead of terse one-liners. The tradeoff is a bit more code, but it's easier to read and follow. I built it up following the same progression as the blog post: bigram count table, then MLP with manual gradients, then autograd, single-head attention, multi-head + layer loop, and finally Adam. Each step is a separate PR and tag on GitHub \[2\] so you can follow along or check out any snapshot. \[1\] https://karpathy.github.io/2026/02/12/microgpt/ \[2\] https://github.com/dubzdubz/microgpt-ts

## Facts

- Category: Ai tools
- Pricing: not known (check the app's own site)
- Claimed: not yet. The builder hasn't claimed this listing (site: microgpt-ts.vercel.app).
- Listed via: https://news.ycombinator.com/item?id=47138175

## Links

- Live app: https://microgpt-ts.vercel.app/
- On JustBuildApps: https://justbuildapps.com/app/11364

## Built this app?

This listing hasn't been claimed by its builder. Claim it to put it on your JustBuildApps profile with all its details: email automatejobhunt@gmail.com or message https://x.com/justbuildapps for your claim link.

## Alternatives

- [microgpt](https://justbuildapps.com/app/8581): very much inspired by karpathy's microgpt of the same name. it's (by default) a 4000 param GPT/LLM/NN that learns to generate names. this…
- [GPT Engineer](https://justbuildapps.com/app/17): A CLI platform that enables developers to experiment with AI-powered code generation. This tool serves as a precursor to Lovable.dev and…
- [Building an LLM in NodeJS \| Building an LLM in NodeJS](https://justbuildapps.com/app/9086): I wanted to understand transformers at a level where nothing is magic, so I'm building a ChatGPT-style model from first principles in…
- [GPT Pilot](https://justbuildapps.com/app/15): An AI developer companion that builds complete applications from scratch using multiple AI agents. It doesn't just generate code snippets…
- [EmojiGPT](https://justbuildapps.com/app/5008): EmojiGPT instantly translates your text into creative emoji sequences using AI. Express yourself visually with a single click!
