Install Pocket Paper & Math Reader from its dedicated origin as an offline academic
reading PWA with OS image/*file_handlers support and zero camera/microphone access.
Honest cache note: browsers isolate Cache Storage per origin, so papers.webai.show stores its
own WebGPU ONNX weights (GLM-OCR 658.1 MB + Qwen3.5-0.8B 666.1 MB q4f16). Staying on
webai.show shares cached weights across the site.
Checking WebGPU shader-f16 capability…
Quadratic & Energy · 960×640Prompt: Text Recognition:
Formula Crop
Drop or paste (Ctrl/Cmd+V) any arXiv screenshot, lecture slide, or whiteboard photo. All pixels stay strictly on your device.
Loaded Quadratic & Energy preset. Run local OCR to extract real Markdown & LaTeX on-device.
Markdown & LaTeX Exports
Zero CDN · Pure Local Files
Extract a paper page above (or enter LaTeX in Raw LaTeX view) to unlock .md, compilable .tex, and .json exports.
Extracted Paper & Math Preview
Awaiting live OCR
Pure-JS AST Renderer · Zero External Fonts
Stage 2 · Qwen3.5-0.8B Math Tutor
Local WebGPU · Apache-2.0
No equation selected
Extract a paper (or enter $$...$$ in Raw LaTeX) to select any equation or table for Qwen3.5-0.8B.
Local AI Engine
Two @huggingface/transformers@4.3.2 WebGPU workers (1,324.2 MB combined
q4f16) plus an optional 21.5 MB PP-OCRv5 Mobile CPU WASM text fallback.
onnx-community/Qwen3.5-0.8B-ONNX · local transformers@4.3.2 override · WebGPU
Optional CPU Fallback · PP-OCRv5 Mobile Text-Line OCR (21.5 MB fp32 · Apache-2.0)
PaddlePaddle/PP-OCRv5_mobile_det_onnx + rec · reused
../../models/pp-ocrv5-mobile/worker.js (onnxruntime-web@1.21.0 CPU WASM) · Plain text
only; use WebGPU for full LaTeX formula recovery.
Stage 1 · GLM-OCRNot loaded
Stage 2 · Qwen3.5-0.8BNot loaded
CPU Fallback · PP-OCRv5Optional · Standby
Detected RuntimeChecking…
How Pocket Paper & Math Reader Works
Two bleeding-edge 2026 multimodal ONNX models run off the main thread on WebGPU via isolated
@huggingface/transformers@4.3.2 workers — paired with a pure-JavaScript LaTeX-to-Math-AST
typesetter (zero external KaTeX/MathJax scripts) and a permissive CPU WASM fallback.
1. GLM-OCR (0.9B · MIT)
onnx-community/GLM-OCR-ONNX (model_type: glm_ocr, 658.1 MBq4f16 or 742.4 MBq4) uses CogViT + GLM-0.5B with official
Text Recognition:, Formula Recognition:, and Table Recognition:
prompts. Passes use_external_data_format: true so all three .onnx_data sidecars
load cleanly on 4.3.2.
2. Qwen3.5-0.8B (Apache-2.0)
onnx-community/Qwen3.5-0.8B-ONNX (model_type: qwen3_5, 666.1 MBq4f16 incl. 19.2 MB tokenizer) combines linear-attention layers with gated full attention.
Runs locally at ~30 tok/s on Apple Metal-3 WebGPU to explain formulas, generate JS/Python code, or audit
SI units with optional <think> traces.
3. Honest WebGPU Gate & CPU Fallback
Quantized q4f16/q4 embeddings use com.microsoft.GatherBlockQuantized(1),
which lacks a CPU kernel in ort-wasm-simd-threaded.asyncify.wasm, while fp32
exceeds wasm32 4 GB. On CPU-only browsers, PP-OCRv5 Mobile
(21.5 MB, Apache-2.0) provides real local text OCR (datalab-to/indra-ocr was excluded due to
its Modified OpenRAIL-M $5M commercial revenue restriction).
Show the code — Stage 1 GLM-OCR WebGPU worker (@huggingface/transformers@4.3.2 + use_external_data_format)Show the code — Stage 2 Qwen3.5-0.8B streaming math tutor & code-conversion workerShow the code — parseOcrDocument() Markdown, LaTeX equation & HTML/pipe table extractorShow the code — parseLatexToAst() zero-CDN recursive-descent LaTeX math parserShow the code — renderMathAstToNode() safe pure-DOM math typesetting (createElement only)Show the code — StageWorkerClient FIFO queue & live token-streaming lifecycle