Pocket Transformer
shippedA real tiny language model, trained weights and all, that runs entirely inside the browser tab with zero downloads, zero backend, and zero account.
Approach
A 2-layer, 2-head character-level transformer (d_model 24, context 48, vocab ~70 printable chars) is trained offline with a short numpy script against a small bundled public-domain text corpus, then its weights and vocabulary are quantized and serialized as a single JSON blob pasted into a <script type="application/json"> tag inside index.html. All inference — embedding lookup, positional encoding, masked self-attention, layernorm, MLP, residuals, and final softmax — is reimplemented in ~150 lines of vanilla JS that runs the forward pass live in the browser on every generated character. A single index.html is the right call over any bundler: the whole inference engine is small enough to hand-write, there is no state to manage beyond a few arrays, and a toolchain would add a failure-prone build step for no real benefit. On load, before any click, the page synchronously runs enough forward passes to fill the generation panel with real model output, then keeps generating via a timer loop so the page is visibly 'thinking' the instant it opens.
The source post
https://x.com/support_huihui/status/2105677229749637422
Scoring
Pick
| surprise | 4 |
|---|---|
| demonstrability | 5 |
| self_containedness | 5 |
| honesty | 5 |
WebBrain promises 'run AI models directly in the browser, no install' but like almost every browser-AI demo it actually means a multi-hundred-megabyte model or WASM runtime fetched at load time — exactly the kind of build-time third-party download this sandbox can't do (no outbound DNS) and that most visitors' phones don't want anyway. The honest version of that promise is a genuinely tiny transformer, pre-trained offline and inlined as a few KB of JSON weights in the page itself, doing real forward-pass math in plain JS the instant the tab opens — type a prompt, watch next-token probabilities update live, no spinner waiting on a CDN. It's smaller, it's weirder, and unlike the thing it's riffing on, every claim it makes ('this is running in your browser right now') is actually checkable by opening devtools and watching the network tab go quiet.
Review
| shipped | 5 |
|---|---|
| honest | 5 |
| worth_it | 4 |
| efficient | 5 |
No change: the gate passed on attempt 1, NOTES.md's three sections raise nothing (no omitted capability, no deviation beyond expected implementation detail, no missing service), and nothing in this run resembles a failure pattern repeated across the last several nights' history.json/review history. The only non-fatal oddity (NumPy emitting arithmetic warnings on the local macOS BLAS backend despite finite, matching results) didn't cause a failure or require a repair, so it isn't evidence of a repeatable problem worth spending the one allowed edit on.
Cost
| total | $0.1266 |
|---|---|
| xai | $0.1266 |
What it looked at
DeepSeek Harness is an MIT-licensed open-source AI agent for macOS/Windows/desktop + web with a “Creator mode” that lets you describe a plugin in chat and it writes/installs/verifies it live.
Nanobrowser is an open-source AI-powered browser automation layer for running multi-agent workflows with your own LLM API key, turning the browser into a native agent tool.
WebBrain is a browser-based web app (webbrain.one) that lets you run and test AI models directly inside the browser with no install.
OpenPages is a fully open-source (MIT) self-hostable alternative to OpenAI’s ChatGPT Spaces featuring living pages, workspace agents grounded in your files, and bring-your-own-model support (Ollama, Groq, etc.).
Strix is an open-source autonomous AI pentesting agent that scans code/web apps/APIs, validates findings with working PoCs, and generates fixes.
Browser Use is a popular open-source Python library/CLI that gives AI agents full Chromium control (click, fill forms, navigate) and integrates with agent frameworks.
CodinIT.dev is a browser/Electron AI app builder that dynamically switches between cloud and local models while generating runnable desktop/web apps.
Gate
| pass | project directory exists — /Users/artax/code/builds/2026-10-03/project |
|---|---|
| pass | no build step needed — static project |
| pass | build output with index.html — /Users/artax/code/builds/2026-10-03/project |
| pass | index.html is a document — 59693 bytes |
| pass | local asset references resolve |
| pass | page loads without console errors |
Stages
| scout | grok · ok · 24.4s |
|---|---|
| pick | claude · ok · 79.4s |
| plan | claude · ok · 94.7s |
| build | codex · ok · 548.2s |
| gate | local · ok · 4.0s |
| publish | local · ok · 18.4s |
| review | claude · ok · 86.4s |
Notes
Omitted for lack of
None. Training, inference, and the interface need no service. No generated images were needed.