── 19.5M parameters · 262M training tokens · 0 servers
A language model
doesn't guess a word.
It has a distribution.
Most autocomplete hides that. NWP-Core shows it: every keystroke, the full probability mass over what comes next, the branch tree two tokens deep, and a surprisal profile of your own prose. The transformer was trained from scratch, quantised to int8, and runs entirely inside this tab.
start typing
── the build
Corpus to browser, end to end.
- 01corpus
WikiText-103 plus a 120k-document slice of OpenWebText, so the model sees both encyclopedic and casual register. A byte-level BPE tokenizer is trained from scratch to a 16,384-word vocabulary, then the whole corpus is written out as a flat uint16 stream.
269,874,330 tokens
- 02architecture
A decoder-only transformer: RMSNorm, rotary position embeddings, SwiGLU feed-forward, grouped-query attention with 6 query heads to 2 KV heads, and the embedding matrix tied to the output head.
8 layers · d=384
- 03training
AdamW with decoupled weight decay on matmul weights only, 500-step warmup into a cosine decay, gradient clipping at 1.0, bf16 autocast on Apple Silicon. Model shape was chosen by measuring throughput, not by guessing.
16,000 steps · 262M tokens
- 04deployment
Exported to ONNX, then dynamically quantised to int8 with per-channel scales — which costs 0.08% perplexity and cuts the download from 103MB to 26.6MB. It runs in a Web Worker so the caret never stutters.
26.6MB · int8
the distribution, not the guess
Five candidates with their actual probabilities, the entropy of the position in bits, and the number of effective choices. A 12%-confident suggestion should not look like a 90%-confident one.
a branch lattice
Two levels of the continuation tree, drawn with edge weights proportional to conditional probability. It is the only view in the app that shows what the model is doing rather than what it decided.
surprisal profiling
Every token in your document scored by how many bits it cost the model. Flat means predictable; spikes are where you surprised it. A profile of your prose against a language model's expectations.
nothing leaves the device
The weights come to you, not your text to a server. Telemetry records latency, entropy and whether you accepted — never a character of what you wrote.
real telemetry
Acceptance rate, characters saved, latency percentiles, per-token accept rates — computed in Postgres from your own events, scoped by row-level security.
a model registry
Every export lands in a versioned registry with its perplexity and accuracy. Promoting a new model demotes the incumbent in one transaction and writes an audit entry.