Streaming Continuation Console
Base non-instruct model: Pythia-70M-Deduped was pretrained strictly for English document completion on deduplicated The Pile — it is not RLHF or chat fine-tuned. Give it an opening sentence, RFC lead, or few-shot pattern rather than a chatbot instruction.
Ready to download or initialise Xenova/pythia-70m-deduped (73.6 MB q8 WASM).
Live continuation stream
See inside — 50,304-vocab BPE & next-token logits
Every prompt and generated continuation is tokenized with GPT-NeoX byte-level BPE
(vocab_size = 50304, <|endoftext|> = ID 0).
Click any token tile below to inspect its exact vocabulary ID and UTF-8 byte span, or audit
the model's un-sampled next-token probability distribution directly from its 50,304 output logits.
Next-token top-8 probabilities
Run Generate or Inspect BPE & next token to inspect logits at the prompt boundary.
Decode step latency (ms)
Warm bar = prefill + first token (TTFT); accent bars = incremental KV-cached decode steps.
At a glance
| Upstream model | EleutherAI/pythia-70m-deduped (step143000 checkpoint, trained on globally deduplicated The Pile) |
|---|---|
| Browser ONNX build | Xenova/pythia-70m-deduped (q8 quantized ONNX graph + GPTNeoXTokenizer) |
| Pipeline task | text-generation with TextStreamer and InterruptableStoppingCriteria |
| Architecture |
GPTNeoXForCausalLM (model_type: "gpt_neox"): 6 layers,
8 heads (head_dim = 64), hidden_size = 512,
intermediate_size = 2048 (GELU), use_parallel_residual = true,
partial RoPE (rotary_pct = 0.25, 16 rotary dims per head),
max_position_embeddings = 2048, untied embeddings (~18.9M non-embedding / ~70.4M total params)
|
| Tokenizer & special tokens |
GPTNeoXTokenizer byte-level BPE, vocab_size = 50304 (padded to multiple of 128),
bos_token_id = 0, eos_token_id = 0 (<|endoftext|>),
add_prefix_space = false
|
| Quantisation & download |
q8 (INT8 quantized decoder weights) · 73.56 MB decimal
(73,556,820 bytes · 70.15 MiB; catalogue 73.6 MB)
|
| Backend & runtime |
CPU WebAssembly (wasm) via shared ../../lib/webai.js
(Transformers.js 3.7.5) in a dedicated module Web Worker — no GPU required
|
| License | Apache-2.0 |
| Honest limitations | English-only 70M base research model. Not instruction-tuned or safety-aligned; will fabricate entities, drift off-topic on chat instructions, or loop if greedy decoding runs without repetition penalty. |
Why Pythia-70M-Deduped in the browser matters
Most browser LLMs are chat-tuned multi-hundred-megabyte assistants. Pythia-70M-Deduped is compact (73.6 MB), runs fast on plain CPU WebAssembly, and exposes the exact GPT-NeoX architecture studied across mechanistic interpretability literature — parallel attention/MLP blocks, partial RoPE, and deduplicated Pile training dynamics.
- Interactive LLM interpretability — probe BPE splits, 50,304-vocab next-token entropy, and decoding parameter sensitivity with zero cloud GPU.
- Offline prefix completion — run lightweight local log and technical-note continuation queues privately in-tab (see Practical).
- Base-LM failure-mode education — demonstrate why unprimed chat instructions fail and how few-shot priming and repetition penalty work (see Wild).
- Hallucination auditing pipelines — chain a tiny base generator with an on-device NER tagger to flag every newly fabricated entity (see Multi-model).
Use-case ladder
Basics: Decoding, BPE & Partial RoPE
Compare greedy vs temperature / top-k / repetition-penalty runs side by side and inspect 50,304-vocab BPE splits and 25% RoPE head dims.
Practical: Technical Note & Log Prefix Queue
Run an offline FIFO continuation queue over ops logs and technical prefixes with Pause, Resume, Cancel, and OWASP-safe CSV / JSON export.
Wild: Base-LM Failure-Mode & Priming Lab
Contrast unprimed chat prompts against few-shot pattern priming and stress-test greedy repetition loops with live distinct-n telemetry.
Multi-model: Continuation + Entity Auditor
Chain Pythia-70M-Deduped (73.6 MB) with built BERT-base NER (110 MB) to highlight grounded vs newly invented PER/ORG/LOC/MISC entities.
How the API works
Pythia-70M-Deduped loads through the standard Transformers.js 3.7.5
text-generation pipeline inside ./worker.js with
TextStreamer so token generation never blocks the main thread.
import { TRANSFORMERS_URL } from "../../lib/webai.js";
const { pipeline, TextStreamer, env } = await import(TRANSFORMERS_URL);
env.allowLocalModels = false;
const generator = await pipeline("text-generation", "Xenova/pythia-70m-deduped", {
device: "wasm",
dtype: "q8",
progress_callback,
});
const streamer = new TextStreamer(generator.tokenizer, {
skip_prompt: true,
skip_special_tokens: true,
callback_function: (chunk) => postMessage({ type: "token", chunk }),
});
const out = await generator("The capital of France is", {
max_new_tokens: 32,
do_sample: false,
repetition_penalty: 1.1,
return_full_text: false,
streamer,
});
Show the code — worker.js: ensureLoaded() (shared 3.7.5 WASM q8 pipeline)
Show the code — worker.js: generateContinuation() (TextStreamer + BPE telemetry)
References
- EleutherAI/pythia-70m-deduped model card — upstream weights, training hyperparameters, and Apache-2.0 license.
- Pythia: A Suite for Analyzing Large Language Models Across Training and Scaling (Biderman et al., 2023)
- Xenova/pythia-70m-deduped — ONNX Runtime Web export loaded by this demo.
-
Transformers.js documentation
—
text-generationpipeline andTextStreamerreference.