OmniCorpus: A Unified Multimodal Corpus of 10 Billion-Level Images Interleaved with Text

## Abstract

Abstract Image-text interleaved data, consisting of multiple images and texts arranged in a natural document format, aligns with the presentation paradigm of internet data and closely resembles human reading habits.
Recent studies have shown that such data aids multimodal in-context learning and maintains the capabilities of large language models during multimodal fine-tuning.
However, the limited scale and diversity of current image-text interleaved data restrict the development of multimodal large language models.
In this paper, we introduce OmniCorpus, a 10 billion-level image-text interleaved dataset. Using an efficient data engine, we filter and extract large-scale high-quality documents, which contain 8.6 billion images and 1,696 billion text tokens. Compared to counterparts ( e.g. , MMC4, OBELICS), our dataset 1) has 15 times larger scales while maintaining good data quality; 2) features more diverse sources, including both English and non-English websites as well as video-centric websites; 3) is more flexible, easily degradable from an image-text interleaved format to pure text corpus and image-text pairs.
Through comprehensive analysis and experiments, we validate the quality, usability, and effectiveness of the proposed dataset. We hope this could provide a solid data foundation for future multimodal model research.
Code and data are released at https://github.com/OpenGVLab/OmniCorpus .

## 1 Introduction

With the rise of large language models (LLMs) [, , , , , , , , , ], multimodal large language models (MLLMs) [, , , , , , , , , , , ] have also made significant progress. These MLLMs typically integrate pre-trained LLMs with vision foundation models (VFMs) [, , , , ], aligning them through extensive image-text pairing datasets (*e.g.*, LAION [] and COYO []), thereby enabling the comprehension of visual cues within language models.
These datasets, collected by web scraping to match images with their descriptive captions, establish robust links between visual and linguistic elements.
Nonetheless, they neglect the original structure of documents, leading to a loss of contextual details and resulting in lower text quality and lack of contextual richness compared to the training corpus of LLMs.
Therefore, there is an imperative need to *investigate more natural and flexible multimodal data that go beyond naive image-text pairings, with the aim of enhancing the training efficacy of MLLMs.*

Pioneering studies [, , , ] have introduced image-text interleaved data, demonstrating their promise in preserving the linguistic prowess of LLMs and boosting few-shot capabilities in tasks such as image captioning and visual question answering (VQA). Despite this progress, the scale of these datasets remains relatively limited, with the most extensive containing approximately 140 million documents, significantly smaller than well-established text or image-text pair datasets. Moreover, their primary data sources, mostly English websites from Common Crawl (CC) [], restrict content variety.
These constraints hinder the datasets’ capacity to fully unleash the potential of MLLMs, restricting their advancement and performance.

Given these considerations, constructing large-scale high-quality image-text interleaved data for MLLMs involves addressing several key challenges: (1) *Diverse data sources:* existing sources like CC are relatively homogeneous, which are mainly text-centric with few images. In addition, the availability of CC images is nearing exhaustion, making it difficult to support the scaling up of future multimodal models. (2) *Large-scale data processing:* An efficient, scalable, and parallelizable data engine is required to handle the massive volumes of multimodal data involved in this task. (3) *High-quality multimodal data:* Comprehensive image and text filters are also crucial to ensure that the generated text corpus maintains the same high quality as the original training data of LLMs while interleaving high-quality images.

In this work, to establish a solid data foundation for MLLM research, we introduce OmniCorpus,
a 10 billion-level image-text interleaved dataset.
To expand data sources and address the exhaustion of CC images, we supplement our dataset with data from non-English websites and high-quality image content from video platforms.
We propose a unified data format, termed streaming data format, which is not only flexible to store image and text data from different sources, but also facilitates subsequent data reading, visualization, and data cleaning.
To efficiently leverage the large-scale data from multiple sources, we develop *an efficient data pipeline capable of scaling to thousands of CPU cores*. We carefully review the overall pipeline of the data engine and optimize each component (*e.g.*, main body extraction, preliminary text filtering) for higher efficiency and speedup ratio in a parallel framework.
To enhance data quality, we implement a *human-feedback text filter* to reduce the noise within the texts, such as advertisements and other irrelevant content.

Figure: Figure 1: Overview of our OmniCorpus dataset. It comprises 8.6 billion images and 1,696 billion text tokens sourced from diverse origins. Additionally, our efficient data engine generalizes the data into various formats, such as text corpus, image-text interleaved, and image-text pairs.
Refer to caption: /html/2406.08418/assets/x1.png

As shown in Figure [1](#S1.F1) and Table [1](#S1.T1), our OmniCorpus dataset demonstrates several advantages over its counterparts:
(1) *Larger data scale:* Our dataset stands as the largest multimodal dataset to date, containing 8.6 billion images, 1,696 billion text tokens, and 2.2 billion documents. It is 1.7 times larger in images and 12.5 times larger in texts compared to the previously largest multimodal dataset, LAION-5B [], while maintaining excellent data quality.
(2) *Richer data diversity*: Drawing from a broader range of data sources, our dataset is more diverse than other image-text interleaved datasets. It includes bilingual multimodal data in both Chinese and English, and encompasses text-centric and vision-centric documents extracted from common websites and video platforms.
(3) *More flexible format*: The streaming data format of our dataset offers exceptional flexibility, allowing adaptation to various data structures, including pure text corpora, image-text pairs, and interleaved data formats.

In summary, our contributions are threefold:

(1) We introduce the OmniCorpus dataset, the largest multimodal dataset to date, which pushes the boundaries of scale and diversity by encompassing 8.6 billion images interleaved with 1,696 text tokens from diverse sources, significantly surpassing previous datasets.

(2) We propose a comprehensive set of tools and algorithms, including a streaming data format that unifies multimodal data from various sources, an efficient and scalable data engine capable of processing large-scale data, and human feedback filters to ensure high-quality data.

(3) Through extensive experiments, we validate the quality and effectiveness of our dataset.
We show that image-text interleaved data enhances few-shot capabilities and maintains the language abilities of multimodal models. Additionally, we also gained some new findings that differ from prior findings.

**Table 1: Comparison with large-scale image-text pre-training datasets. “#Avg.” denotes “#Images per sample | #Tokens per sample”. The concept of “#Docs” applies only to interleaved image-text datasets and is not relevant to paired image-text datasets. The proposed OmniCorpus dataset features a significantly larger scale and a broader range of sources compared to previous image-text datasets.**
| Dataset | #Images | #Tokens | #Docs | #Avg. | Language | Source |
| --- | --- | --- | --- | --- | --- | --- |
| *Image-text Paired Datasets* |  |  |  |  |  |  |
| COYO-700M [] | 747M | 12.9B | $-$ | 01 | 17 | English | Common Crawl |
| LAION-5B [] | 5B | 135B | $-$ | 01 | 27 | multilingual | Common Crawl |
| *Image-text Interleaved Datasets* |  |  |  |  |  |  |
| KOSMOS-1 data [] | $-$ | $-$ | 71M | $-$ | $-$ | English | Common Crawl |
| M3W (Flamingo) [] | 185M | $-$ | 43M | -4.3 | $-$… | English | English Websites |
| Web Interleaved (MM1) [] | 1B | 500B | 500M | K2 | 1K | English | English Websites |
| MMC4-Core [] | 29.9M | 2.4B | 7.3M | 04.1 | 329. | English | Common Crawl |
| MMC4 [] | 585M | 43B | 103M | 05.7 | 417. | English | Common Crawl |
| OBELICS [] | 353M | 115B | 141M | 02.5 | 816. | English | Common Crawl |
| OmniCorpus-YT (ours) | 2.1B | 7.7B | 10M | 210 | 770 | English | YouTube Videos (YT) |
| OmniCorpus-CW (ours) | 3.2B | 940B | 1196M | 002 | 330 | Chinese | Chinese Websites (CW) |
| OmniCorpus-CC (ours) | 3.3B | 748B | 988M | 03.3 | 757. | English | Common Crawl (CC) |
| OmniCorpus (ours) | 8.6B | 1696B | 2.2B | 03.9 | 574. | Bilingual | CC, CW, YT |

## 2 Related Works

### 2.1 Image-Text Datasets

As one of the three pillars of deep learning, datasets play a critical role in advancing deep learning models, especially in vision-language models (VLMs).
Prior to the era of large-scale models, image-text datasets [, , , , , , , , , , ] are primarily human-annotated and have limited data scale.
For example, VQAv2 [] annotated each image with several question-answer pairs, while Visual Genome [] further provided region-level annotations.
However, these datasets have limited data scales and fail to encompass diverse scenarios in the open world, hindering models’ generalization ability.
To achieve open-world capability, CLIP [] and ALIGN [] proposed training models using web-scale image-text pairs collected from the internet.
Subsequent works [, , , , , , , , , , , ] have also been introduced for open-source research.
Among them, LAION-5B [] is the pioneering dataset offering billion-scale image-text pairs, whereas AS-1B [] is the first extensive dataset to provide region-level image-text pairs.
However, these datasets contain limited world knowledge in each sample, affecting the performance of the underlying language model of VLMs.
Recently, a series of interleaved datasets [, ] have been proposed to address these issues. Nonetheless, the data source and the languages involved in these datasets are limited.
In this work, we propose the OmniCorpus, the first 10 billion-level image-text interleaved dataset comprising multiple data sources and languages.

### 2.2 Vision-Language Models

Significant advancements have been made in the field of vision-language models (VLMs) in recent years.
Previous methods [, ] mainly focused on specific downstream tasks within predefined closed sets, while recent works have shifted towards understanding the open world.
Models trained with contrastive learning-based methods [, , , ] are capable of recognizing and understanding open-world semantics through an image-text matching framework, although their lack of generative ability limits their applicability.
In recent years, the advancement of large language models (LLMs) [, , ] has led to the emergency of many LLM-based VLMs [, , , , , , , ].
As one of the representative works, InternVL-1.5 [] achieves performance comparable to GPT-4V [].
Additionally, models like Kosmos-2 [] and ASMv2 [] enable LLMs to comprehend specific regions within images.
Recently, a series of works [, , , , , , ] have explored the use of image-text interleaved data to enhance VLM capabilities.
However, the training corpora for these models remain limited to English data from Common Crawl.
The effectiveness of image-text interleaved data from other sources or languages is still unexplored. In this work, we provide more empirical insights into the use of interleaved data.

## 3 Data Engine

### 3.1 Overall Pipeline

Figure: Figure 2: Overview of the data processing pipeline. It contains five key stages: main body extraction, preliminary text filtering, document deduplication, image downloading & filtering, and detailed text filtering. Each stage efficiently reduces the dataset to retain only high-quality data.
Refer to caption: /html/2406.08418/assets/x2.png

Figure [2](#S3.F2) illustrates the overall pipeline of our data engine, which consists of five key stages as follows:

Main Body Extraction.
We extract primary content from each web document using an improved version of Trafilatura [], which can more accurately and efficiently extract main content and images while handling a broader range of languages (see Section [3.2](#S3.SS2)). We enhance sections based on the HTML structure’s density if the extracted content is insufficient. HTML documents without images are dropped in this stage. Some explicit advertisements or sidebars are excluded through HTML structure analysis and URL pattern matching for images. Then, we convert the HTML structure into the streaming data format, which is a unified data format applicable to different data sources.
It preserve tags for individual elements, including <text>, <image>, <code>, <header>, <detail>, <quote>, <video>, <audio>, <table>, and <list>.
During this step, we remove 47% of documents.

Preliminary Text Filtering.
Given the streaming data from the main body extraction, we perform preliminary text filtering by employing strategies from Gopher [] and C4 [] to eliminate extremely low-quality content, such as documents with excessive numbers, documents with texts that are too long or too short, and documents containing “lorem ipsum.” Additionally, we introduce some heuristic rules to further filter the text, such as removing documents with too many continuous line breaks or documents where a single word’s frequency is excessively high. During this step, we remove 80% documents from the remaining HTML documents.

Document Deduplication with Text.
We remove duplicate documents by comparing their text content using minihash [] values with a threshold of 0.8 and retaining the latest version. This step significantly reduces redundancy, discarding approximately 90% of duplicates.

Image Downloading & Filtering.
In this step, we discard invalid images that were not successfully downloaded. Adhering to MMC4 [] guidelines, we filter out images with a height or width of fewer than 150 pixels and an aspect ratio greater than 2 or less than 0.5. Following LAION-5B [], we exclude images with an aesthetic score below 3.7 or a Not Safe for Work (NSFW) score above 0.8. Additionally, we identify and remove images that appear more than 10 times across HTML documents by computing perceptual hash (phash) and difference hash (dhash) values.

Detailed Text Filtering.
We finetune models based on BERT [] for scoring advertisement content, political content, toxic content, NSFW material, and document fluency. Using these models, we discard documents containing excessive ads, inappropriate content, or poor language quality. In addition, to further improve data quality, we use a human-feedback filtering strategy (see Section [3.3](#S3.SS3)) to develop a multimodal filter suitable for English and non-English content.

In addition, we enhance the diversity of our dataset by creating storyboard datasets from various video sources. This includes extracting keyframes and transcribing audio content from YT-Temporal-1B [], HD-VILA-100M [], HowTo100M [], and InternVid []. More details can be found in the supplementary material.

### 3.2 Tweakings

To enhance the effectiveness and efficiency of our pipeline, we carefully refine the data pipeline from key aspects as follows:

Pre-Deduplication.
The resources required for image downloading, filtering, and detailed text filtering are substantial, involving significant bandwidth, GPU resources, and human feedback. Given that the deduplication step filters out a large number of documents and images, we choose to perform deduplication in advance. This approach effectively reduces the number of images to be downloaded and the volume of documents requiring detailed text filtering. As a result, it saves approximately 86 PB seconds of bandwidth in downloading images, 4500 A100 GPU days in image filtering, and 130 GPU days along with 45 person-days in detailed text filtering.

Improved Main Body Extraction.
Our extraction algorithm has been significantly improved compared to the vanilla Trafilatura [].
In terms of accuracy, we have addressed the issue where Trafilatura would overlook the main content of an HTML document when extracting images, and enhanced its capability to handle Chinese, Japanese, and Arabic documents. Additionally, we have incorporated techniques to trim web noise regions based on HTML structure (such as clusters of lists and navigation bars) and style (targeting elements like advertisements, comments, JavaScript, and CSS).
In terms of efficiency, we optimized the process based on HTML nodes and streamlined the processing pipeline by eliminating the fallback process in challenging cases. With these two improvements, we can not only extract more informative content from the main body but also double the speed of the extraction process.

Improved Image Downloading.
We integrate efficient download task scheduling and resource allocation while employing Bloom filtering technology [] to deduplicate URLs of images that have been downloaded or are pending processing.
This method effectively prevents redundant download requests, optimizing storage resources and bandwidth usage. Consequently, it provides robust technical support for the efficient collection and analysis of large-scale image data.
Specifically, our approach reduces URL download requests from 30 billion to 9.65 billion and accelerates the downloading process by a factor of 1.5.

Pipeline Parallelism.
Our pipeline runs in a modular parallel manner, offering several benefits. (1) The system will have greater fault tolerance since we can modify or improve each section of the pipeline independently.
(2) Different parts of the pipeline require different types of resources, such as main body extraction runs on CPUs, image filtering runs on GPUs, and image downloading requires bandwidth, so a modular design is more reasonable. (3) by allocating resources based on throughput rather than evenly distributing them, we can significantly speed up the process. Compared to equal resource allocation, our parallel assembly line achieves a 1.39 times speed increase.

With all these improvements, the dataset processing pipeline can now scale up to thousands of CPUs, thousands of GPUs, and 3Gbps bandwidth, tripling its processing speed in that configuration.

### 3.3 Human-Feedback Filtering

Based on the pipeline introduced in Section [3.1](#S3.SS1), a significant portion of low-quality data has been removed.
However, the remaining documents are still noisy.
In this section, we introduce the human-feedback filtering method used to optimize the text filters, further improving the document quality.
The optimized filter comprises nearly 30 filtering rules for English and 40 for Chinese. These filtering rules can be found in the Appendix.

To build these filtering rules, we first sample a subset of documents according to various criteria, including completeness, comprehensibility, fluency, relevance, and safety.
After that, we manually design additional filtering rules to remove the low-quality documents from these sampled documents.
These rules are then evaluated on a human-annotated evaluation set, and those achieving excellent performance are added to our filtering pipeline. The evaluation metric includes the miss rate and the false positive rate.
By repeating the above process, we can iteratively optimize the quality and comprehensiveness of text filters based on human feedback.

### 3.4 Streaming Data Format

We use a comprehensive and unified streaming data format to preserve rich and diverse information about the original data.
Given an HTML document, we first split it into several chunks according to its layout, each formulated as image-text interleaved sequences $x=\left(x_{1},x_{2},...,x_{n}\right)$, where $x_{i}$ can be a text sentence or an image.
Then we concatenate these chunks in a top-to-bottom, left-to-right order to obtain a streaming interleaved sequence.

Based on this data format, the formulation of HTML documents, image-text pairs, and video sequences can be easily unified, which means that we can process these heterogeneous data from different sources in a unified manner.
In addition to the content of the given data, other meta-annotations, including image aesthetic scores, image/text NSFW scores, political scores, toxic scores, unsafe scores, and text fluency, are also included in the streaming data. We hope that these meta-annotations can help researchers to better understand and utilize the dataset for various applications.

## 4 Exploring OmniCorpus

Figure: Figure 3: Joint distribution of the image and token numbers per document. We use kernel density estimate to get the distribution.
Refer to caption: /html/2406.08418/assets/x3.png

General Statistics.
As shown in Table [1](#S1.T1), our OmniCorpus is currently the largest and the first open-source multilingual interleaved dataset.
It surpasses the combined totals of all previous interleaved datasets [, , , ].
Figure [4](#S4.F4) illustrates the joint distribution of text tokens and images in the interleaved sequences from OmniCorpus.
See Appendix for more details.

Figure: Figure 5: Visualization of topic clusters and example images. The four diagrams from left to right correspond to MMC4 [], OmniCorpus-CC, OmniCorpus-YT, and OmniCorpus-CW. The clusters are T-SNE [] projection of LDA [] topic modeling results. We select 2 topics for each dataset and show two image examples for each topic.
Refer to caption: /html/2406.08418/assets/x5.png

Diversity Analysis. To measure and analyze the diversity of document content, we follow previous studies [, ] and employ Latent Dirichlet Allocation (LDA) [] to assess the topic diversity of the dataset.
Figure [5](#S4.F5) illustrates the significant differences in topics across documents from different sources, highlighting the importance of various sources in enhancing data diversity.
The detailed topic modeling results are presented in the Appendix.

Qualitative Assessment of Dataset Samples.
We randomly sample 200 documents from OmniCorpus-CC to evaluate their quality. There are 405 images in these documents. Among them, 88.4% are relevant to the documents, 8.0% contain watermarks, 4.0% contain logos, and 0.2% are advertisements.
Additionally, 86.4% of the documents feature photographic images, while 13.6% included graphic images such as cartoons. Furthermore, 32.1% of the images contain at least one written word, and 22.7% of the images contain structured text. No NSFW images were found.

Quality Validation.
As illustrated in Figure [4](#S4.F4), we present the joint distribution of text scores and image scores across each set of 1 million sampled documents. The image score is calculated as the average of the aesthetic score and the NSFW score. The text score is determined by averaging the advertisement content score, the NSFW content score, and the document fluency score.
In terms of image scores, all datasets perform similarly. The OmniCorpus-CC exhibits superior text quality. Specifically, our OmniCorpus-CC has a lower proportion of low-quality text compared to other datasets, with the difference diminishing as test quality increases. This indicates a higher proportion of high-quality tests in OmniCorpus-CC.

## 5 Experiments

### 5.1 Experimental Settings

Baselines.
We construct our baseline models following LLaVA-1.5 [], which comprises a vision encoder, a multimodal projector, and an LLM.
The input sequence to the LLM is a token sequence consisting of interleaved visual and textual tokens. The language modeling loss is used to train the model, which is only calculated on text tokens.
Unless otherwise specified, we employ CLIP-ViT-L-336px [] as the vision encoder and Vicuna-1.5-7B [] as the LLM.

Evaluation.
We evaluate our models on VQA benchmarks [, , , ] and image captioning benchmarks [, ].
The accuracy score is used for VQA, while CIDEr [] is used for image captioning.
Following OpenFlamingo [], we extend the benchmarks to few-shot settings to assess in-context learning.
Specifically, in-context examples are sampled using RICES [].

### 5.2 Main Findings

Figure: Figure 6: Ablation on image position strategies. Red solid: fully autoregressive. Blue dashed: cross-attention. Triangular: natural. Circular: retrieval-based.
Refer to caption: /html/2406.08418/assets/x6.png

Different image position strategies excel in different architectures.
Existing multimodal document datasets organize interleaved image and text sequences in two main ways.
The MMC4 dataset [] employed a retrieval strategy, inserting images into text sequence based on CLIP similarities, while the OBELICS dataset [] maintained the natural layout of the source webpage.
We conducted ablation studies on OmniCorpus-CC to evaluate both strategies using a fully autoregressive architecture like LLaVA-1.5 [] and a cross-attention architecture like Flamingo [].
As shown in Figure [6](#S5.F6), the natural strategy performs better with the fully autoregressive architecture, whereas the retrieval-based strategy excels with the cross-attention architecture.
This suggests that the cross-attention architecture benefits from optimal correlation between images and their surrounding paragraphs, while the fully autoregressive architecture prefers a natural arrangement that aligns with typical reading habits.

**Table 3: Pre-training ablation on curated subsets. We report the zero/few-shot results on four MLLM benchmarks, including two VQA and two image captioning tasks. The first column shows the number of documents per subset, with 1M documents randomly sampled for training.**
| Eval Set | OKVQA | TextVQA | COCO | Flickr30k | Avg. |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| #Shot | 0 | 1 | 2 | 4 | 0 | 1 | 2 | 4 | 0 | 1 | 2 | 4 | 0 | 1 | 2 | 4 | 0 | 1 | 2 | 4 |
| .988M | 15.2 | 34.1 | 31.8 | 32.8 | 21.7 | 30.5 | 34.6 | 37.7 | 41.9 | 73.6 | 85.0 | 94.9 | 34.2 | 41.4 | 47.5 | 52.6 | 28.2 | 44.9 | 49.7 | 54.5 |
| .600M | 17.1 | 34.9 | 32.3 | 30.1 | 23.0 | 31.7 | 35.8 | 37.9 | 41.4 | 75.3 | 85.7 | 96.9 | 34.2 | 43.6 | 48.8 | 55.8 | 28.9 | 46.4 | 50.6 | 55.1 |
| .200M | 12.7 | 36.0 | 38.8 | 41.1 | 17.7 | 32.6 | 38.0 | 42.0 | 46.9 | 80.8 | 92.2 | 97.2 | 36.1 | 43.9 | 48.6 | 54.3 | 28.3 | 48.3 | 54.4 | 58.7 |
| 0.40M | 13.4 | 35.5 | 38.6 | 41.4 | 17.1 | 32.1 | 35.9 | 39.4 | 38.3 | 79.8 | 91.6 | 96.0 | 29.5 | 44.0 | 47.7 | 53.6 | 24.6 | 47.8 | 53.5 | 57.6 |
| 00.8M | 12.2 | 35.6 | 38.2 | 40.8 | 15.9 | 32.9 | 36.3 | 38.2 | 41.5 | 78.2 | 89.4 | 93.5 | 32.4 | 42.9 | 49.0 | 51.6 | 25.5 | 47.4 | 53.2 | 56.0 |
| 02.5M | 13.5 | 35.7 | 39.1 | 41.3 | 18.2 | 33.2 | 37.7 | 41.1 | 46.4 | 78.9 | 91.9 | 95.9 | 35.4 | 43.7 | 48.8 | 54.5 | 28.4 | 47.9 | 54.4 | 58.2 |

**Table 4: Comparison with open-source interleaved image-text datasets. We report the zero/few-shot results on four MLLM benchmarks. The best two results are highlighted with bold font.**
| Eval Set | OKVQA | TextVQA | COCO | Flickr30k | Avg. |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| #Shot | 0 | 1 | 2 | 4 | 0 | 1 | 2 | 4 | 0 | 1 | 2 | 4 | 0 | 1 | 2 | 4 | 0 | 1 | 2 | 4 |
| MMC4 [] | 15.1 | 29.0 | 24.0 | 23.2 | 21.2 | 27.6 | 30.3 | 33.8 | 45.7 | 70.9 | 82.1 | 88.4 | 36.3 | 32.5 | 39.0 | 43.8 | 29.6 | 40.0 | 43.9 | 47.3 |
| MMC4-Core [] | 13.5 | 29.5 | 27.1 | 26.8 | 20.5 | 27.1 | 32.1 | 35.6 | 41.0 | 72.1 | 84.6 | 90.3 | 34.3 | 37.5 | 41.1 | 45.6 | 27.3 | 41.5 | 46.2 | 49.6 |
| OBELICS [] | 13.9 | 35.0 | 36.8 | 40.2 | 17.9 | 30.3 | 35.7 | 40.7 | 50.7 | 74.7 | 91.3 | 97.1 | 42.7 | 41.4 | 47.5 | 54.7 | 31.3 | 45.3 | 52.9 | 58.2 |
| OmniCorpus-YT | 16.5 | 36.1 | 38.4 | 40.1 | 22.9 | 34.5 | 38.1 | 41.0 | 40.6 | 71.2 | 78.0 | 83.8 | 32.9 | 30.0 | 32.2 | 36.0 | 28.2 | 43.0 | 46.6 | 50.2 |
| OmniCorpus-CC | 12.7 | 36.0 | 38.8 | 41.1 | 17.7 | 32.6 | 38.0 | 42.0 | 46.9 | 80.8 | 92.2 | 97.2 | 36.1 | 43.9 | 48.6 | 54.3 | 28.3 | 48.3 | 54.4 | 58.7 |

**Table 5: Comparison with state-of-the-art MLLMs pre-trained with interleaved image-text data. “*” indicates that the zero-shot evaluation follows Flamingo [], which actually includes two text-only examples. The prompt for TextVQA [] does not contain OCR tokens. To align with the evaluation setting of comparison models, we sample the in-context examples randomly.**
| Model | Pre-training Data | #Shot | COCO | Flickr30k | OKVQA | TextVQA | VQAv2 | VizWiz |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
|  |  | *0* | 79.5 | 59.5 | 37.8 | 24.2 | 52.7 | 27.5 |
|  |  | 4 | 89.0 | 65.8 | 40.1 | 28.2 | 54.8 | 34.1 |
| OpenFlamingo-9B [] | MMC4<br>LAION | 8 | 96.3 | 62.9 | 41.1 | 29.1 | 54.8 | 38.5 |
|  |  | *0* | 46.0 | 27.3 | 38.4 | 25.9 | 50.9 | 35.5 |
|  |  | 4 | 93.0 | 59.7 | 45.4 | 27.6 | 55.4 | 36.9 |
| IDEFICS-9B [] | OBELICS<br>Wikipedia<br>LAION, PMD | 8 | 97.0 | 61.9 | 47.7 | 27.5 | 56.4 | 40.4 |
|  |  | *0* | $-$ | $-$ | 42.8 | $-$ | 52.9 | 34.4 |
|  |  | 4 | $-$ | $-$ | $-$ | $-$ | 58.4 | 41.3 |
| Emu-14B [] | LAION, LAION-COCO<br>MMC4, WebVid-10M<br>YT-Storyboard-1B | 8 | $-$ | $-$ | $-$ | $-$ | 59.0 | 43.9 |
|  |  | *0* | 81.2 | 59.2 | 45.0 | 43.0 | 63.2 | 49.8 |
|  |  | 4 | 91.9 | 63.2 | 45.5 | 45.4 | 64.5 | 51.3 |
| Ours (7B) | LAION<br>OmniCorpus-CC | 8 | 97.6 | 63.5 | 46.6 | 45.6 | 64.7 | 52.2 |

Data filtering benefits MLLMs to some extent.
We further construct several curated subsets of approximately 600M, 200M, 40M, 8M, and 2.5M documents from OmniCorpus-CC, according to the meta-annotations introduced in Section [3.4](#S3.SS4).
To validate the benefits of data filtering, we trained baseline models using 1M documents randomly sampled from subsets, separately.
As shown in Table [3](#S5.T3), the model trained on the 200M subset outperforms those trained on larger subsets and performs similarly to the model trained on smaller subsets. This suggests that data filtering can improve data quality, but over-filtering may harm performance due to data homogenization.

Image-text interleaved fine-tuning maintains in-context learning ability.
We pre-train the baseline architecture with 1M documents randomly sampled from OmniCorpus-CC and fine-tune it using the LLaVA-665K dataset [].
We compare zero-shot and few-shot performance on four MLLM benchmarks, as well as a text-only benchmark (*i.e.*, MMLU []), as shown in Table [2](#S5.T2).
The image-text interleaved pre-trained model shows a stepwise improvement with more in-context examples. After fine-tuning with high-quality conversation samples, there are overall enhancements for the average performance on four MLLM benchmarks, but the positive correlation with the example number is no longer maintained. Additionally, we replace the caption and VQA samples in the SFT data with few-shot samples whose format is aligned with the evaluation, yielding significantly improved few-shot performance. Despite the slight decline in zero-shot performance, the best few-shot average score shows considerable improvement compared to the baseline. Therefore, including image-text interleaved samples in SFT data is still essential. Furthermore, due to the absence of text-only instruction following samples in this setting, the model’s language capability decreased. However, the high-quality data used in SFT significantly improved the language ability, effectively mitigating the disadvantages introduced during the pre-training phase.

OmniCorpus-YT boosts VQA performance while degrading captioning ability.
The previous studies have merely incorporated storyboard samples into a pre-training data mixture without thoroughly investigating the specific impact. Our goal is to pre-train an MLLM exclusively using documents collected from video and evaluate it on image-text benchmarks.
We randomly selected 1M samples from OmniCorpus-YT. For each sample of video frames with text, we uniformly extracted six frames as images for the document and removed the remaining frames, constructing an image-text interleaved document. As shown in Table [4](#S5.T4), the model trained on sampled OmniCorpus-YT achieves the best VQA capabilities, but its captioning scores are the lowest. The results demonstrate the feasibility of extracting image-text interleaved documents from video resources.

OmniCorpus-CW improves the Chinese ability.
We pre-train on 1M Chinese documents randomly sampled from OmniCorpus-CW and fine-tune with LLaVA-665K data []. We find that the scores improve from 59.8 to 62.5 (+2.7) for MMBench-CN [] and from 23.6 to 24.9 (+1.3) for CMMMU [],
demonstrating the effectiveness of our OmniCorpus-CW data.

### 5.3 Comparison Experiments

To compare the data quality to the related dataset, we train the same baseline architecture with 1M documents randomly selected from MMC4, MMC4-Core [], OBELICS [], and OmniCorpus-CC, respectively. As is shown in Table [4](#S5.T4), the OmniCorpus-CC exhibits optimal few-shot performance and near-optimal zero-shot performance.

To demonstrate the potential of the OmniCorpus for large-scale MLLMs pre-training, we design a recipe for training a competitive 7B baseline foundation model with our dataset. We replace the LLM with InternLM2-7B []. Additionally, we collect a large-scale data mixture, including image-text interleaved data (OmniCorpus-CC), paired image-text data (LAION []), and text-only data. We compare our model with OpenFlamingo [] mainly pre-trained with MMC4 [] and IDEFICS mainly pre-trained with OBELICS []. We follow them to add two evaluation sets, VQAv2 [] and VizWiz [], for evaluating the pre-trained models. The evaluation setting is aligned with the OpenFlamingo []. The comparison performance is presented in Table [5](#S5.T5). We can see that our 7B model is superior to the larger 9B OpenFlamingo and IDEFICS in most cases. Especially for VQAv2 and TextVQA, our model achieves a cliff lead.

## 6 Conclusion & Limitation

In this work, we introduce the OmniCorpus dataset, the largest multimodal dataset to date. This dataset contains 8.6 billion images, 1,696 billion text tokens, and 2.2 billion documents, which are collected from three data sources: Common Crawl, Chinese websites, and video platforms.
We elaborate on the data engine used to construct this dataset and carefully analyze its diversity and quality.
Experimental results demonstrate the effectiveness of our OmniCorpus. We also provide some new insights according to these experiments.

Regarding limitations, the current filtering process offers limited improvements to the model’s performance. Demonstrating which specific factors meet the conditions that benefit the model is complicated and is not thoroughly explored in this study and will be left for future work.

Broader Impact.
We hope this work can provide a solid data foundation for the future advancement of MLLMs.
We do not foresee obvious undesirable ethical/social impacts at this moment.

## Peer Reviews

confidence: 4
contribution: 3
initial_rating: 6
presentation: 3
questions: - How was the set of "Chinese Websites" decided?
- I assume that the frequencies that appear in section 4 where obtained by manual inspection by the authors of the 200 randomly sampled documents, is that correct? or where they shipped to external evaluators?
soundness: 2
strengths: - The paper presents OmniCorpus, a large multimodal (text and vision) and multilingual (English and Chinese) dataset containing hundreds of millions of documents (bilions of images, and trilions of tokens). This is by far the largest publicly available dataset that I know of, which can increase the amount of data available to conduct research on Vision-Language Models.
- The dataset has been carefully deduplicated and filtered to prevent NSFW content, personal information, offensive content, etc.
summary: The paper presents OmniCorpus, a large multimodal (text and vision) and multilingual (English and Chinese) dataset containing bilions of images interleaved with trilions of tokens. The paper explains how the data was obtained, filtered, and formated, and presents several experiments conducted on the dataset (i.e. training a VLM on the dataset from existing publicly-available vision encoders and text decoders).
weaknesses: - As with many other datasets using crawled data from the Internet, it's not clear if 1) the authors of the paper themselves followed the terms of use of the sources of the data, and more importantly (from the user's perspective) if 2) the use of the downloaded data by the users (people training VLMs) may be subject to different terms of use / restrictions that are not directly stated anywhere, and may depend on different jurisdictions (e.g. can researchers legaly use this data to conduct research? both academic and industry researchers? can they release the models trained on this dataset?). 
The authors acknowledge this in the "ethical discussion" in appendix A3 (and other parts of the appendix A): "it is impractical to obtain explicit consent from all content creators". I personally agree with this statement, but I think it should be mentioned in the main paper.
- I would appreciate a table similar to Table 5, but comparing the author's model train only on LAION (for instance) and OmniCorpus-CC, varying the number of the total number of tokens (e.g. text tokens + image tokens after encoding). This would be a proxy measuring the "quality" of both datasets, defined as "downstream accuracy that a token from the dataset provides". If the quality of the dataset proves to be relatively high, my soundness score would increase.
- It seems that the authors worked on improving the support of other languages beyond Chinese and English (e.g. line 237: "we [...] enhanced its capability to handle Chinese, Japanse and Arabaic documents"), however they decided to include only Chinese and English documents at the end. This is a lost opportunity (and amount of work) to have a truly multilingual (and not bilingual) dataset.
- As all the the other publicly available massive datasets, only the URL images are provided, which may difficult the reproducibility of the experiments conducted using it over time.

---

confidence: 4
contribution: 3
initial_rating: 6
presentation: 3
questions: A few quick notes for authors to improve the paper:  
1) Table metrics and abbreviations should be clearly explained in the text where applicable. 
2) minihash -> MinHash. We also need to understand what hash functions used to better understand how the dedup is performed for repeatability. 
3) Table 5 - Shall the authors do a deep dive for the few shot evaluations with the proposed pre-training dataset (especially for COCO dataset)?  We need deeper understanding of why the few shot metric improvements are so high. Examples would also help especially for those the baseline models fail but the model pre-trained with OmniCorpus performs better. 
4) Do the authors plan to release the code used for dataset generation?
soundness: 3
strengths: - Largest open source multi-modal dataset to date (8.6B images interleaved with text) 
- Describes a detailed framework to collect and curate large multi-modal datasets at scale. 
- Extensive ablations showing the value of the dataset with interleaved text format for few shot and other multi-modal understanding tasks.
summary: The paper introduces a novel multi-modal and bilingual corpus at billions scale with image and text interleaved format. The dataset has three subsets (CC, CW, YT). The data processing and filtering steps for each subset is carefully designed and clearly explained. Extensive experiments are performed to access the both quality and the value of the dataset for multi-modal large language modeling tasks. Several  pre-training and fine-tuning experiments ablations demonstrate the value of the proposed dataset.
weaknesses: - It is not 100% clear, if one can replicate the same data collection process and produce similar quality datasets. The models used for filtering content, the thresholds and potentially other important details seem to be missing. 
- Table metrics and abbreviations need to be explained for clarity.

---

confidence: 3
contribution: 3
initial_rating: 8
presentation: 3
questions: No obvious shortcomings observed.
soundness: 3
strengths: 1. The largest open-source multimodal dataset to date. It pushes the boundaries of scale and diversity by encompassing 8.6 billion images interleaved with 1,696 text tokens.
2. A comprehensive set of tools and algorithms, including a streaming data format that unifies multimodal data from various sources, an efficient and scalable data engine capable of processing large-scale data, and human feedback filters to ensure high-quality data.
3. comprehensive analysis and experiments.
summary: This paper introduces OmniCorpus, a 10 billion-level open-source image-text interleaved dataset. And it proposes an efficient data engine. It also conducts comprehensive analysis and experiments.
weaknesses: No obvious shortcomings observed.

---

confidence: 5
contribution: 4
initial_rating: 8
presentation: 4
questions: Will all the data processing code and the data be open-sourced?
soundness: 4
strengths: **Large Scale**: The dataset boasts an unprecedented scale of 8.6 billion images and 1.696 trillion text tokens, making it the largest multimodal dataset available.

**Diversity**: OmniCorpus includes data from a wide range of sources, including both English and non-English websites, as well as video-centric platforms, which enhances the diversity of the dataset.

**Usability**: The dataset has been validated through comprehensive analysis and experiments, demonstrating its quality, usability, and effectiveness.

**Writing**: This manuscript is well-written, with clear motivation and solid experimental discussions.
summary: This manuscript introduces OmniCorpus, a massive multimodal dataset consisting of 10 billion-level images interleaved with text. This dataset is designed to support the development of multimodal large language models by providing a more diverse and larger scale of image-text data compared to existing datasets. The contributions of this manuscript include the introduction of the largest multimodal dataset, a set of tools and algorithms for data processing, and extensive experiments that validate the dataset's quality and effectiveness.  The authors conducted experiments to explore the effectiveness of image-text interleaved data for few-shot capabilities and language model maintenance. They also compared OmniCorpus with other datasets and found that their dataset outperforms others in terms of quality and diversity.
weaknesses: **Bias**: The paper acknowledges potential biases in the dataset but does not provide a detailed analysis of these biases.

**Filtering Mechanisms**: The current filtering process may not be sufficient to ensure high-quality data.

Meta-review: The paper proposes a very large dataset for MLLM research, including video. Its size, diversity and benchmarking form a significant contribution. Some concerns were raised about the ethics of the data collection and some aspects of the experiments, but seem well addressed. Three reviewers are strongly in favor of acceptance, and one weakly.

Decision: Accept (Spotlight)