Skip to decoding and BPE playground

Basics · Greedy vs sampling · 50,304-vocab BPE · rotary_pct 0.25 · WASM q8 · 73.6 MB

Decoding Strategy, BPE & Partial-RoPE Playground

Run deterministic greedy decoding side by side against temperature, top-k, and repetition-penalty sampling on the same document prefix, see exactly which token index diverges, and inspect GPT-NeoX's 50,304-token byte-level BPE and 25% partial rotary position embeddings.

Greedy vs Sampled Decoding Lab

Why decoding matters on a base LM: Pythia-70M-Deduped is a non-instruct causal LM. Greedy decoding always picks the argmax token (deterministic, but prone to short cycles without repetition penalty), whereas temperature + top-k reshape the 50,304-token softmax distribution before sampling.

Load Xenova/pythia-70m-deduped to run side-by-side decoding comparisons.

First divergence–
Greedy entropy (T=1.0)–
Sampled entropy–
Prompt BPE tokens–
Chars / token–
Context / 2048–

Run A · Greedy (do_sample=false, penalty=1.00)

Waiting for greedy run…

Run B · Sampled (T, top-k, repetition penalty)

Waiting for sampled run…

GPT-NeoX 50,304-Vocab BPE & Partial-RoPE Geometry

GPT-NeoX uses a 50,254-merge byte-level BPE tokenizer padded to 50,304 entries for tensor-core alignment, plus partial RoPE (rotary_pct = 0.25): only the first 16 of each attention head's 64 dimensions carry rotary position angles (base = 10000), while 48 dimensions stay unrotated across the 2,048-token window.

GPTNeoXForCausalLM: 6 layers · 8 heads · 64 dims/head · rotary_pct = 0.25 (16 rotary / 48 pass-through) · parallel residual.

Click any BPE token chip below to inspect its vocabulary ID, visible whitespace markers, and UTF-8 byte count.

See inside the code

Show the code — pythia-core.mjs: computeTopKFromLogits() (temperature-scaled softmax & entropy)
Show the code — pythia-core.mjs: analyzeTokenPieces() (BPE & partial-RoPE summary)