SOMA.

A tiny language model running entirely in this tab — weights, sampling, everything. No server. Nothing you type leaves your device.

No transformers. No attention. Trained without backprop.

params of weights nats/char
fetching weights…
Opened directly from disk? Browsers block pages on file:// from fetching local files, so pick the weights manually — choose (or drop) the soma.bin sitting next to this page.
For the full experience serve the folder instead: python3 -m http.serverhttp://localhost:8000

temp 0.80 top-k 40 top-p 0.95 repeat 1.05 length 400
copied ✓
tok/s ms/tok ctx 0 paths entropy ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ bits mem backend

What is this

SOMA is a tiny character-level language model that runs entirely in your browser. No transformers. No attention. Trained without backprop. It reads and writes text directly, and the whole thing is small enough to fetch as a single file — smaller than most hero images.

It writes plausible-looking almost-English. At this scale, that is the point: the interesting part is watching a sub-megabyte network learn spelling, morphology, and the rhythm of prose as it happens.

How it runs here

Inference happens on your device. The matrix kernels are hand-written WebAssembly SIMD (f32x4, dual accumulators) running in a Web Worker, with a plain typed-array fallback if WASM SIMD is unavailable. Typical throughput is thousands of tokens per second on a laptop.

The page fetches one file of weights (soma.bin: a JSON header + raw fp32 tensors), caches it, and all inference after that is local — generation makes zero network requests. The only telemetry is an anonymous page-view count; the text you type and generate never leaves the tab.