translation · text2text-generation · 78.07 MB WASM q8 · 60M Unified Prefix T5 · Apache-2.0

Google T5-Small — 60M Unified Text-to-Text Transformer

google-t5/t5-small (ONNX export Xenova/t5-small, Apache-2.0) is the classic Raffel et al. (2020) 6+6 encoder-decoder (35.64 MB encoder + 42.43 MB merged decoder = 78.07 MB q8 WASM). Unlike instruction-tuned Flan-T5, base T5-Small switches between translation, summarization, and GLUE benchmarks purely through its exact C4/WMT natural-language task prefixes.

Upstream Card google-t5/t5-small
Loaded ONNX ID Xenova/t5-small
HF Task / Pipeline translation · text2text-generation
Weights & Quant 78.07 MB · WASM q8
Architecture 6+6 T5 · 60M · 32,128 SP
License Apache-2.0

1. Multi-Prefix Text-to-Text Studio

One 60M-parameter model, six prefix-switched tasks: Runs pipeline("text2text-generation", "Xenova/t5-small", { device: "wasm", dtype: "q8" }) via shared Transformers.js 3.7.5 in a dedicated Web Worker. Pick a task prefix tab below to prepend the canonical C4/GLUE/WMT control grammar to your input.

Task prefix tabs (switches the exact control string prepended to the encoder input):

Or load a calibrated preset across translation, summarization, CoLA, and MNLI:

Assembled encoder prompt:
Upload or drop a local text file (.txt, .md, .csv, .srt) File contents stay 100% on your device.
Latency–
Decode speed–
In → Out tokens–
Beam width1
NaN check–
Backend / dtypeWASM · q8

Generated Output

WMT14
Download or initialise Google T5-Small above to run live inference in WebAssembly.

2. See Inside: 32,128-Piece SentencePiece Tokenization

T5 prepends the task prefix inside the exact same 32,128-token SentencePiece stream as your text (▁ marks word boundaries, </s> is token ID 1, and <pad> is decoder start ID 0). Inspect how prefix tokens separate from content subwords below.

Task prefix Word start (▁) Continuation (+) Special (</s>)

SentencePiece breakdown will appear after running T5-Small.

Run a prompt above to inspect SentencePiece prefix and content tokens.

3. Why Google T5-Small Matters & Worker Source

Published by Colin Raffel et al. (2020), T5 proved that a single encoder-decoder trained on the Colossal Clean Crawled Corpus (C4) plus supervised task prefixes can translate, summarize, and classify without task-specific output heads. At 78.07 MB quantized q8, it remains one of the lightest multi-task seq2seq baselines on the web.

Show the code — worker.js ensureLoaded() Transformers.js pipeline init
Show the code — worker.js runSinglePrompt() inference & real NaN check