use case · basics · Xenova/texify · image-to-text · WASM q8 · ~320 MB

Token-by-Token LaTeX Decoder Studio

See how an OCR-free vision-encoder-decoder actually writes LaTeX: a Donut-Swin encoder reads the equation image once, then an mBART decoder emits LaTeX markup one token at a time. Pick any sample (or upload/paste), adjust max_new_tokens, watch each token land with its arrival timestamp, and compare the raw delimited string against cleanLatex().

1 · Model status (on-device WASM worker)

2 · Choose an equation image & decoder budget

Drop an equation image here, paste from clipboard (Ctrl/⌘+V), or click a sample below.

Waiting for Xenova/texify to finish loading…

3 · Live token arrival tape & raw vs cleaned LaTeX

Each badge below is one real chunk emitted by TextStreamer inside the Web Worker, tagged with its arrival time (+ms) since the start of decoding. Lower max_new_tokens to 24–40 to see autoregressive generation stop mid-expression.

Select a sample or upload an equation to stream tokens here.
Raw model output (with Texify delimiters)
—
Cleaned body via cleanLatex()
—
Typeset preview appears after decoding completes.
Backend: — Total latency: — First token: — Tokens streamed: — Throughput: — Budget: 256

Inspect the live source

Show the Web Worker inference code
Show the LatexEngine worker bridge
Show the LaTeX metadata parser