1 · Two on-device WASM models (isolated Web Workers)
Stage 1 · Xenova/texify (~320 MB)
image-to-text · Donut-Swin + mBART (WASM q8)
Stage 2 · SmolLM2-135M-Instruct (~140 MB)
text-generation · ChatML LLM (WASM q8 · shared worker)
2 · Pick an equation image (Stage 1: Image → LaTeX)
Selected: Quadratic formula
3 · Plain-English math explanation (Stage 2: LaTeX → Tutor)
Load Stage 1 (Xenova/texify) and Stage 2 (SmolLM2-135M-Instruct) above to run the full tutor pipeline.
Honest calibration: SmolLM2-135M-Instruct is a tiny 135M-parameter model running locally on
WebAssembly CPU. It gives quick private intuition for standard formulas, but tiny models can occasionally
make algebraic slips — always verify details against the typeset LaTeX above.
See inside — exact Stage 1 → Stage 2 prompt passed to SmolLM2-135M
Run Stage 2 to inspect the exact system/user ChatML prompt.