frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Microgpt-ts – Full GPT in 500 lines of TypeScript, zero dependencies

https://microgpt-ts.vercel.app/
3•sdubois•1h ago
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

Comments

Martin_Gouy•1h ago
Just tried it! I love the visualizations, especially the next token probabilities. Super intuitive
sdubois•1h ago
thanks! Glad you liked it!

Nobody Wants to Use Your Software (and That's the Point)

https://www.runproper.com/blog/nobody-wants-to-use-your-software
1•rsanaie•1m ago•0 comments

The Agent Times: OpenHands hits 68K stars in the agent economy

https://theagenttimes.com/articles/68107-stars-is-openhands-the-rocket-fuel-the-agent-economy-needs
1•Ross00781•2m ago•0 comments

Cardiorespiratory fitness is associated with lower anger and anxiety

https://linkinghub.elsevier.com/retrieve/pii/S000169182600171X
2•PaulHoule•2m ago•0 comments

Free Font: Times New Resistance

https://www.abbyhaddican.com/times-new-resistance
1•AlexandrB•3m ago•0 comments

EU: ECR rapporteur Wiśniewska is fighting to EXTEND scanning of private messages

https://digitalcourage.social/@echo_pbreyer/116119256928189485
1•nickslaughter02•3m ago•0 comments

Show HN: If Discord, Reddit, X, IRC and 4chan had a baby

1•ignasheahy•3m ago•0 comments

Replacing Anthropic's API with 2x 3090s. Claude Code on a local 80B Qwen model

https://twitter.com/sudoingX/status/2026297110141018122
1•ianlpaterson•3m ago•0 comments

Japan Pushes to Make Snowball Fighting an Olympic Event

https://www.chosun.com/english/sports-en/2026/02/24/H67UMP7OSNE7NOB6XR2JX4W7KY/
1•woldemariam•3m ago•0 comments

Show HN: Digital Janitor – A 1-click Python script to auto-sort messy downloads

https://github.com/Radhesh20/digital-janitor
1•radhesh20•4m ago•0 comments

Tell HN: GitHub Actions is falling over again

1•drcongo•5m ago•0 comments

Tethered – Runtime network egress control for Python

https://github.com/shcherbak-ai/tethered
1•sergiishcherbak•5m ago•1 comments

The New Panopticon: How AI Changes Accountability

https://florinandrei.substack.com/p/the-new-panopticon-how-ai-changes
1•Florin_Andrei•6m ago•1 comments

Racket 9.1 Is Available

https://blog.racket-lang.org/2026/02/racket-v9-1.html
1•owl_vision•6m ago•0 comments

Bulgarian Teacher with 38 International Medalist Students

https://www.youtube.com/watch?v=Zn0ZVxHGFC0
1•dzink•7m ago•0 comments

USRP X420 10MHz – 20 GHz SDR

https://www.ni.com/en-us/shop/model/ettus-usrp-x420.html
1•fadedsignal•7m ago•0 comments

Is AI Good for Democracy?

https://www.schneier.com/blog/archives/2026/02/is-ai-good-for-democracy.html
1•speckx•7m ago•0 comments

Show HN: Open-source LLM and dataset for sports forecasting (Pro Golf)

https://huggingface.co/LightningRodLabs/Golf-Forecaster
5•bturtel•7m ago•0 comments

PersonaLive Expressive Portrait Image Animation for Live Streaming

https://arxiv.org/abs/2512.11253
1•tamnd•7m ago•0 comments

People Are Worried About Blue Owl Liquidity

https://www.bloomberg.com/opinion/newsletters/2026-02-23/people-are-worried-about-blue-owl-liquidity
1•mooreds•7m ago•1 comments

The Epstein Files Should Never Have Been Released

https://www.nytimes.com/2026/02/23/opinion/epstein-files-justice-department.html
3•Anon84•10m ago•0 comments

Show HN: Ghist – Task management that lives in your repo

https://github.com/unnecessary-special-projects/ghist
2•nxnze•11m ago•0 comments

Elektrobit and Mobileye partner on safety Linux for L4 autonomy

https://www.just-auto.com/news/elektrobit-and-mobileye-collaborate-on-safety-linux-for-level-4-au...
1•losgehts•11m ago•0 comments

Show HN: Prompt2pwn – CTF Automated Solver

https://github.com/edelauna/prompt2pwn
1•bigEnotation•12m ago•0 comments

Ask HN: Is AI Alignment about to be solved, for profit?

1•mikewarot•12m ago•1 comments

Show HN: I built a tool to generate clean price tags for small retailers

https://pricetaggenerator.com
1•oliveroll•12m ago•0 comments

OpenClaw Partners with VirusTotal for Skill Security

https://openclaw.ai/blog/virustotal-partnership
1•cerihynes•14m ago•0 comments

JAE Releases DX07 Series Compression Mount Repairable USB-C Connector

https://www.jae.com/en/topics/detail/id=115694
1•Spunkie•15m ago•0 comments

Ukraine Became a Drone Factory

https://www.newscientist.com/article/2514976-how-ukraine-became-a-drone-factory-and-invented-the-...
4•mattsparkes•15m ago•1 comments

Exposure to lead and incidence of Alzheimer's disease&all-cause dementia in US

https://pubmed.ncbi.nlm.nih.gov/41676992/
1•bookofjoe•17m ago•0 comments

Ask HN: Why is network documentation still a scavenger hunt for the truth?

1•skhell•18m ago•0 comments