Back to Week 2 submissions

SELF-EVIDENT — I built a GPT from scratch that trains itself, live, in your browser

Most “AI builds” are a wrapper around someone else’s model.

Source note: Local copy of a Summer Into AI 2026 submission originally published on Substack. Screenshots, video, and audio found in the post body are mirrored locally when publicly accessible; profile and avatar images are intentionally not copied. Read the canonical post.

Participant
Myles
Week
Week 2
Canonical Substack
https://merlinforge.substack.com/p/self-evident-i-built-a-gpt-from-scratch
Demo
https://myles-mf.github.io/summer-into-ai-2026/week-2/self-evident/
Code
https://github.com/myles-mf/summer-into-ai-2026/blob/main/week-2/self-evident/index.html (link only; code is not mirrored here)
Bonuses
Personal site archive
Builds on others
Yes
SELF-EVIDENT — I built a GPT from scratch that trains itself, live, in your browser screenshot from the original Substack post.
SELF-EVIDENT — I built a GPT from scratch that trains itself, live, in your browser screenshot from the original Substack post.

Most “AI builds” are a wrapper around someone else’s model. You call an API, you style the output, you ship. I wanted to build the thing itself — the network, the learning, the math — and then prove it’s real.

SELF-EVIDENT is a real GPT: a char-level transformer with token and positional embeddings, causal multi-head self-attention, a feed-forward network, layer norm, and residual connections. The forward pass, the full backpropagation, and the AdamW optimizer are all written by hand, in one HTML file. No TensorFlow. No PyTorch. No autograd library. No API. You can open the page source and read every line that makes it think.

And it ships no model at all. It starts as pure noise — random weights, nothing pretrained — and teaches itself to write, live, while you watch. Press one button and it begins training on the founding documents: the Declaration, the Constitution’s preamble, the Federalist Papers. The loss curve falls in real time and the output climbs from random characters → fragments → words → the cadence of 1776, in front of you. A live attention heatmap shows a head learning what to look at; a frozen twin — the identical architecture that never trains — sits beside it spitting permanent gibberish, so the difference is undeniable.

Why this isn’t a gimmick. A gimmick looks impressive and falls apart the moment you poke it. So I built it to be poked:

It’s a tiny model (~63k parameters) learning a style, not a fact-machine — it won’t answer questions like ChatGPT, and I’m not pretending it can. The point is the opposite: it’s small enough to be born in a browser tab, and real enough that everything you watch it learn, it learned right here, from nothing, with no ancestors.

On the theme — and a step past it. Week 2 asked for independence as a mechanic, not a symbol. Most of us read that as fireworks and forts. I went for the deepest version I could find: independence as self-origination. Every other AI build depends on something — a provider, a cloud, a pretrained checkpoint, an API key. This one depends on nothing. No server, no key, no inherited weights. It’s an intelligence that owes its mind to no one and forms itself, in the open, from scratch. It declares independence from every model that came before it. That’s the mechanic, taken as far as I could take it.

A real nod to Eric. Eric set this week’s theme — and then shipped Qwen Franklin, 22 LoRA adapters fine-tuning Qwen into Ben Franklin. It’s serious ML, and honestly it’s what made me aim higher; I didn’t want to answer a real model-training build with a toy. But Qwen Franklin trains offline, on a 24GB download and a capable GPU, and you go fetch the result. SELF-EVIDENT trains in front of you, on any laptop, from a single link, with zero install — and it isn’t fine-tuning a giant someone else made; it’s the whole network, built and trained from nothing in one file you can read. Same respect for the depth, pointed at the one thing a model zoo can’t hand you: watching the intelligence actually form. Thanks for setting the bar high, Eric — it pushed the whole week.

What I learned building it. Writing backprop by hand is humbling and clarifying in equal measure — one wrong index in the attention gradient and the whole thing quietly fails to learn, which is exactly why the gradient check earns its keep. And training in a browser meant moving the engine into a Web Worker so the UI never stutters, with the same verified functions running there — one source of truth, no second copy to drift.

Watch it teach itself (give it a minute, or hit fast-forward):

A note to close the week. This is my fifth build for Week 2 — after Dependency Day, SOLO, Murmuration, and Liberty Engine. That’s a lot of shipping in a few days, so I’m going to take the rest of the week to rest, let these five breathe, and come back fresh when the next theme drops. Five engines of independence feels like a good place to stop. See you next week … maybe ★

Original source

Canonical Substack URL: https://merlinforge.substack.com/p/self-evident-i-built-a-gpt-from-scratch.