Search is not available for this dataset
image
image

ChineseWebText 2.0: Large-Scale High-quality Chinese Web Text with Multi-dimensional and fine-grained information

This directory contains the ChineseWebText2.0 dataset, and a new tool-chain called MDFG-tool for constructing large-scale and high-quality Chinese datasets with multi-dimensional and fine-grained information. Our ChineseWebText2.0 code is publicly available on github (here).

ChineseWebText2.0

  • Dataset Overview

We have released the latest and largest Chinese dataset, ChineseWebText 2.0, which consists of 3.8 TB of data. Each text in the dataset is accompanied by a quality score, domain single-label and multi-label tags, as well as toxicity classification and scores, enabling LLM researchers to select data based on new quality thresholds.

  • Data Example

    {
    "text": "近日,黑龙江省高校校报协会第十四届学术年会暨校报工作交流研讨会在东北农业大学举行。我校10件新闻作品喜获2项一等奖,2项二等奖,6项三等奖……",
    "domain":
       {
          "single_label": "news",
          "multi_label": ["news", "education"]
       },
    "toxicity":
       {
          "label": 0,
          "score": 1.0347155694034882e-05
       },
    "quality_score": 0.96044921875
    }
    
  • "text": [string] Text content of data sample.

  • "single_label": [string] The highest probability label generated by the domain classification model.

  • "multi_label": [list] All labels generated by the domain classification model with probabilities higher than the threshold.

  • "label": [int] Toxicity label generated by toxicity classification models.

  • "score": [flaot] Toxicity score generated by toxicity classification model, samples with scores exceeding 0.99 were categorised as toxic.

  • "quality_score": [float] Quality score generated by the quality evaluation model.

MDFG-tool

Introduction

We introduce a new toolchain, MDFG-tool (see Figure 1). We begin with the coarse-grained filtering module, which applies rule-based methods to clean the data, focusing on criteria such as text length and sensitive words to ensure data quality. After cleaning, we evaluate the text quality using a BERT-based model. This process generates a quality score, and by selecting an appropriate threshold, we can extract high-quality text data that meets our needs. Next, we use FastText for both single-label and multi-label classification of the cleaned data. Meanwhile, we conduct toxicity assessment. The FastText model is used to filter out toxic content and assign toxicity scores to each text. This scoring system allows researchers to set thresholds for identifying and selecting harmful texts for further training.


Figure 1: The pipeline of MDFG-tool.

Data Analysis

Removal Rate for Different Stages

In order to provide a high-level overview of the preparation and preprocessing stages, the figure followed shows the processing workflow and the removal rate of each step. This figure details the removal ratio of data from the previous step and the absolute percentage of the remaining data from the original collected dataset, thereby facilitating readers in tracking the various processing stages from the raw data to the high-quality dataset.

After collecting raw data from various sources, we initially obtain a original Chinese dataset totaling 6.6 TB. However, due to a significant amount of irrelevant and noisy content in some sources, a manual sampling analysis is performed in preparation stage. If irrelevant text accounted for more than 50% of a source, the data from that source will be discarded entirely. As a result, a substantial portion of the data is removed during the preparation stage, retaining only 67.68% of the original dataset. In preprocessing stage, four rule-based steps are implemented to filter the remained data. First, the Data Length step remove overly short texts to ensure that each text contains sufficient informational content. Next, the Character Proportion step eliminate texts with a high percentage of noisy characters, such as English, Traditional Chinese characters, or other irrelevant symbols. Finally, the Sensitive Words step and the Deduplication step are employed to remove toxic content and duplicate texts from the dataset. After the preprocessing stage, we produce a high-quality Chinese text dataset totaling 3.8 TB. In the next stage, each text in this high-quality dataset will be enriched with fine-grained annotations, including a quality score, domain lablels, a toxicity score and a toxicity label.


Figure 2: The proportion of data removed from the originally collected data in each processing step. The gray bars represent the proportion of data removed in each step relative to the data remaining before that step, while the other colored bars represent the retained data and its proportion relative to the originally collected data.

Data Quality Distribution


Figure 3: The Data Analysis on Quality Evaluation.

Quality Distribution To investigate the quality distribution, we calculate the data proportions across different quality score ranges from our ChineseWebText 2.0 dataset. Figure 3(a) shows the proportion of data across different quality score intervals. The data is primarily concentrated in the mid-range score intervals ([0.2, 0.4)), each contributing approximately 18%. Additionally, a significant proportion lies within the high-quality interval ([0.9, 1.0)), reflecting the presence of high-quality content in the dataset. In contrast, the lowest interval ([0.1, 0.2)) contains only a minimal fraction, indicating a limited amount of poor-quality data. Note that the quantity of quality scores in the range [0, 0.1) is zero, so this interval has been omitted. This quality distribution provides a valuable reference for LLM researchers, enabling them to select data based on desired quality thresholds.

Human Acceptance Evaluation To validate the consistency between quality evaluation and human judgments, Figure 3(b) displays human acceptance rates across different score intervals, showing a clear positive trend: higher scores correlate with higher acceptance rates. Specifically, the highest score interval ([0.5, 1.0)) achieves an acceptance rate exceeding 90%, while the lowest interval ([0.1, 0.2)) still maintains an acceptance rate of 80%. This trend highlights the overall high quality of the data.

In summary, the dataset is primarily concentrated in the mid-quality range, with higher scores strongly correlating to greater human acceptance. This alignment underscores the dataset's potential for high-quality applications, where consistency in human-like quality is essential.

Domain Distribution

To investigate the distribution of our dataset across different domains, in this section, we conduct an in-depth analysis of the data distribution across eleven distinct domains: book, dialogue, education, encyclopedia, finance, law, math, medicine, news, technology, and general. This analysis considers two perspectives: the overall domain distribution and the quality-related domain distribution, providing comprehensive insights into the dataset's composition across different domains.

Overall Domain Distribution

As illustrated in Figure 8, the sample counts and corresponding proportions across various domains are presented. The Encyclopedia, General, and News domains dominate the dataset, comprising 33.43%, 32.63%, and 28.01% of the data, respectively. In contrast, the Math domain has the smallest share at 0.55%, yet it still includes over 8 million samples. Figure 9 complements this with a bar chart that provides a more intuitive visualization of the data distribution. This comprehensive domain distribution enables LLM researchers to select suitable datasets, facilitating the enhancement of the model’s knowledge and capabilities in specific domains.


Figure 4: Data Distribution Across Different Domains.

Quality-Related Domain Distribution In order to explore the domain distribution across different quality intervals, we perform an analysis focusing on the quality-related domain distribution. Specifically, we calculate the proportions of various domains within each quality interval. As shown in Figure 5, this table provides a detailed breakdown of domain proportions across different quality intervals. From the results, we observe that the distribution of domain data within each quality interval aligns closely with their overall distribution in the dataset. Based on the proportions in Figure 5, researchers can filter domain-specific data within targeted quality intervals, enabling the extraction of higher-quality domain-specific data subsets.


Figure 5: Table of Domain Distribution Across Quality Levels

Data Toxicity Analysis


Figure 6:The Distribution of Toxicity: A threshold of 0.99 was established, and samples with scores exceeding 0.99 were categorised as toxic.

During the training procedure of LLMs, toxic data introduces harmful knowledge and information, which may lead the model to generate toxic outputs. In this section, we analyze the toxicity distribution within our dataset. As shown in Figure 6, it depicts the toxicity distribution of the dataset. In this figure, a higher toxicity score indicates greater toxicity. It is evident that the majority of the data in our dataset has a toxicity score of 0.0, signifying non-toxic, high-quality data. These non-toxic texts comprise 97.41% of the dataset.

Additionally, through manual analysis of the toxicity scores, we identify that data with scores above 0.99 are classified as toxic. By applying this empirical threshold, we filter our dataset and obtain a 3.16GB toxic text subset comprising 1,632,620 samples. In Figure 7, we conduct a comparison between this subset with other publicly available toxic datasets. In this table, OffensEval 2019, AbusEval, HatEval, RAL-E and ToxiGen are English toxicity datasets, while COLD, ToxiCN, SWSR and CDial-Bias are Chinese toxicity datasets. The OffensEval 2019, AbusEval, and HatEval datasets are derived from Twitter and focus on the analysis of offensive language, abusive language, and hate speech, respectively. The RAL-E dataset, sourced from a banned Reddit community, is a large-scale, unannotated English dataset. In contrast, ToxiGen is a toxicity dataset generated using GPT-3, targeting multiple groups. The COLD, SWSR, CDial-Bias, and ToxiCN datasets are collected from Chinese social media platforms including Zhihu, Weibo, and Tieba, with each dataset focusing on different groups. Compared to these datasets, ours features the largest collection of toxicity data and each text contains a toxicity score, providing researchers with a valuable resource to better optimize and evaluate LLMs' safety.


Figure 7: Table of Comparison of Different Toxicity Datasets.

Citation

Please cite the paper if you use the data or code in this repo.


Downloads last month
150
Edit dataset card