Image-to-LaTeX Converter for Mathematical Formulas and Text
Abstract
A vision encoder-decoder model using Swin Transformer and GPT-2 achieves high performance in converting images of mathematical formulas and text to LaTeX code, with Base and fine-tuned LoRA versions evaluated against other models.
In this project, we train a vision encoder-decoder model to generate LaTeX code from images of mathematical formulas and text. Utilizing a diverse collection of image-to-LaTeX data, we build two models: a base model with a Swin Transformer encoder and a GPT-2 decoder, trained on machine-generated images, and a fine-tuned version enhanced with Low-Rank Adaptation (LoRA) trained on handwritten formulas. We then compare the BLEU performance of our specialized model on a handwritten test set with other similar models, such as Pix2Text, TexTeller, and Sumen. Through this project, we contribute open-source models for converting images to LaTeX and provide from-scratch code for building these models with distributed training and GPU optimizations.
Community
Hi, I’m planning to rebuild and train this model from scratch, and I’d like to know what GPU specifications would be sufficient for the training.
If anyone has experience with a similar model or has recommendations regarding GPU/VRAM requirements, I’d really appreciate your advice. Thank you!
Get this paper in your agent:
hf papers read 2408.04015 Don't have the latest CLI?
curl -LsSf https://hf.co/cli/install.sh | bash Models citing this paper 1
Datasets citing this paper 0
No dataset linking this paper
Spaces citing this paper 0
No Space linking this paper
Collections including this paper 0
No Collection including this paper