InfiMM-WebMath-40B: Advancing Multimodal Pre-Training for Enhanced Mathematical Reasoning
Xiaotian Han, Yiren Jian, Xuefeng Hu, Haogeng Liu, Yiqi Wang, Qihang Fan, Yuang Ai, Huaibo Huang, Ran He, Zhenheng Yang, Quanzeng You
TL;DR
The paper tackles the lack of open, large-scale multimodal datasets for mathematical reasoning by constructing InfiMM-WebMath-40B from CommonCrawl, featuring interleaved text and image data with rigorous filtering and deduplication. It details a three-stage training pipeline—modality alignment, continue pre-training, and instruction fine-tuning—using a SigLip-based visual encoder and Perceiver Resampler to train InfiMM-Math on DeepSeek-Coder backbones. Empirical results show strong text-only gains at 40B tokens, competitive performance on GSM8K/MMLU, and state-of-the-art multimodal results on MathVerse and We-Math for open models. The work provides a publicly available dataset and demonstrates open-source potential for advanced multimodal mathematical reasoning, with future directions including improved math-focused vision encoders and reinforcement-learning-based reasoning enhancements.
Abstract
Pre-training on large-scale, high-quality datasets is crucial for enhancing the reasoning capabilities of Large Language Models (LLMs), especially in specialized domains such as mathematics. Despite the recognized importance, the Multimodal LLMs (MLLMs) field currently lacks a comprehensive open-source pre-training dataset specifically designed for mathematical reasoning. To address this gap, we introduce InfiMM-WebMath-40B, a high-quality dataset of interleaved image-text documents. It comprises 24 million web pages, 85 million associated image URLs, and 40 billion text tokens, all meticulously extracted and filtered from CommonCrawl. We provide a detailed overview of our data collection and processing pipeline. To demonstrate the robustness of InfiMM-WebMath-40B, we conducted evaluations in both text-only and multimodal settings. Our evaluations on text-only benchmarks show that, despite utilizing only 40 billion tokens, our dataset significantly enhances the performance of our 1.3B model, delivering results comparable to DeepSeekMath-1.3B, which uses 120 billion tokens for the same model size. Nevertheless, with the introduction of our multi-modal math pre-training dataset, our models set a new state-of-the-art among open-source models on multi-modal math benchmarks such as MathVerse and We-Math. We release our data at https://huggingface.co/datasets/Infi-MM/InfiMM-WebMath-40B.
