alephpi/Texo
A minimalist SOTA LaTeX OCR model with only 20M parameters, running in browser. Full training pipeline available for self-reproduction. | 超轻量SOTA LaTeX公式识别模型,仅20M参数量,可在浏览器中运行。训练全流程代码开源,以便自学复现。
What it solves
Texo is a lightweight, open-source LaTeX OCR model designed to convert images of mathematical formulas into LaTeX code. It addresses the need for a free, fast, and accessible tool for STEM learners and researchers who need to digitize handwritten or printed mathematical expressions.
How it works
Texo is a distilled version of the PPFormulaNet-S model, fine-tuned on the UniMERNet-1M dataset. It uses a model architecture based on PaddleOCR's PPHGNetV2 and leverages the Hugging Face Transformers framework for its decoder and tokenizer. The model is highly optimized for size, containing only 20 million parameters, allowing it to run efficiently on consumer-grade GPUs and even within a web browser.
Who it’s for
- STEM learners and researchers: Users who need to quickly convert mathematical images to LaTeX.
- Developers: Those looking for a lightweight OCR model that can be integrated into applications or run in the browser.
- ML practitioners: Individuals interested in distillation and fine-tuning for specialized OCR tasks.
Highlights
- Ultra-lightweight: Only 20M parameters, significantly smaller than other SOTA models like UniMERNet-T (107M).
- SOTA Performance: Maintains comparable performance to larger models in terms of BLEU and Edit distance metrics on the UniMERNet-Test dataset.
- Accessible: Free and open-source (AGPL-3.0) and can be run in the browser via a separate web implementation.
- Trainable: Can be trained on consumer-level GPUs (minimum 16G GPU memory).
- Comprehensive: Includes training scripts, data normalization tools, and a technical report.