What is it?
- Recipe for producing a state-of-the-art LLM pre-training dataset having
10+ Trillion
tokens, derived from FineWeb V1.1.0 - Evaluation results showing more than
2%
avg improvement (with multiple random seeds) over FineWeb V1.1.0 tokens on common benchmarks for a7B
parameter ablation model - Data Prep Kit Notebook for reproducing the annotations and filters on top of FineWeb and Notebook for applying a bloom filter on FineWeb to quickly reproduce an approximate version of GneissWeb (without annotations or filters)
- Details in the Blog and Paper
- (COMING UP) Ablations model with
7B
parameters pre-trained with350B
tokens of GneissWeb - Gneiss, pronounced "nice" (naɪs), is a durable igneous rock, just like IBM’s open-source Granite models trained from it
The GneissWeb Recipe in a Nutshell: Building on Top of FineWeb
Huggingface introduced FineWeb V1.1.0, a large-scale dataset for LLM pre-training, consisting of 15 Trillion
tokens (44TB
disk space). We started with the goal ofproducing 10+ Trillion
high quality tokens from FineWeb V1.1.0, so that we get sufficiently large number of quality tokens suitable for pre-training. Unlike FineWeb-Edu and similar domain-specific datasets, which rely on a single quality annotator and perform aggressive filtering, we developed a multi-faceted ensemble of quality annotators to enable fine-grained quality filtering. This allowed us to achieve a finer trade-off between the quality and quantity of the tokens retained. The GneissWeb recipe allows fo tuning the filtering thresholds such that the resulting dataset can be suitable for pre-training as well as annealing.
Recipe Steps
The GneissWeb dataset was obtained by applying the following processing steps to Fineweb:
- Exact substring deduplication at line level
- Custom built Fasttext quality filter
- Custom built Fasttext category classifier
- Custom built Category-aware readability score quality filter
- Custom built Category-aware extreme token quality filter
These were applied in the order shown in the Fig 1
.

Figure 1: GneissWeb recipe
Evaluation Strategy
To compare GneissWeb against the baselines, we trained decoder models of 7B
parameters on Llama architecture. These were trained on 350B
tokens to validate the performance of each processing step. The data was tokenized using a starcoder tokenizer and training was done with PyTorch FSDP stack and a sequence length of 8192
.
We used FineWeb V1.1.0 and FineWeb-Edu-score2 as our comparison baselines. The former contains 15T
tokens and the latter contains 5.4T
tokens. Fig 2
shows how the subsamples were created for the Fineweb baselines as well for GneissWeb.

Figure 2: Subsampling and Ablation Strategy
Evaluation Benchmarks Selection
We evaluated our ablation models using lm-evaluation-harness on two categories of tasks: 11 High-Signal tasks (0-shot and few-shot) and 20 Extended tasks (0-shot and few-shot).
High-Signal tasks
Similar to FineWeb, we used the following criteria for selecting the 11 High-Signal/Early-Signal tasks: accuracy above random guessing, accuracy monotonically increasing over training epochs, and small variance across runs. These are shown in Fig 3
and cover Commonsense Reasoning, Reading Comprehension, World Knowledge and Language Understanding task categories. We used both the zero-shot as well as few-shot variations of these tasks.

Figure 3: High Signal Tasks — provide good signal at relatively small scale (of 1.4B
models trained on 35B
to 100B
tokens)
The High-Signal tasks were used to analyze individual ingredients and possible recipe combinations via ablations. After we narrowed a few candidate recipes using these signals, we used the extended set of benchmarks to evaluate the model’s ability to generalize.
Extended tasks
The extended tasks shown in Fig 4
are a superset of the High Signal tasks. Besides the task categories of Commonsense Reasoning, Reading Comprehension, World Knowledge, Language Understanding, it also has the category of Symbolic Problem Solving. For the extended set, we also focus on zero-shot as well as few-shot variations.

Figure 4: Extended Tasks — broader set of tasks to evaluate generalization at larger number of tokens and/or larger model sizes
The Extended Task set have some tasks which are not in High Signal. These tasks are useful but at ablation scale may have high standard deviation (like PubMedQA
) or are at random guessing the entire training cycle (like MMLU
) or which are above random guessing but do not show improvement with training (like GSM8k
). However, these tasks are useful indicators for larger model performance and thus have been retained in the Extended Tasks set.
Evaluation Results, 7B
parameter model, 350B
Tokens
Given than training models of size 7 Billion
parameters require lot more compute and so does evaluation, we have limited training to 350 Billion
tokens. We see that the models trained on GneissWeb outperform the models trained on FineWeb.V1.1.0 and FineWeb-Edu-score-2.

Figure 5: Comparison of Average Eval Scores on High Signal and Extended Eval Tasks at 7B
model parameters for 350B
tokens. Scores are averaged over 3 random seeds used for data sampling and are reported along with standard deviations.

Figure 6: Average evaluation score on High-Signal tasks versus the number of tokens at 7B
model parameters for 350B
tokens. The model trained on GneissWeb consistently outperforms the one trained on FineWeb.1.1.0.
Summary
Developers: IBM Research
Release Date: Feb 10th, 2025
License: Apache 2.0
What is being released?
fastText models used in the curation of GneissWeb
- Quality Classifier
The fastText model takes as input text and classifies whether the text is "high-quality" (labeled as
__label__hq
) or "low-quality" (labeled as__label__cc
). The GneissWeb ensemble filter uses the confidence score given to__label__hq
for filtering documents based on an appropriately chosen threshold. The fastText model is used along with DCLM-fastText and other quality annotators. Please refer to the example notebook for using a fastText model with Data-prep-kit. - Classifiers for Science, Technology, Medical and Education. Each classifier takes as input text and classifies whether the text belongs to the target topic (labeled as
__label__hq
) or other categories "cc" (labeled as__label__cc
). Please refer to the example notebook for using the classifiers with Data-prep-kit. The GneissWeb ensemble filter uses the confidence score given to__label__hq
for filtering documents based on an appropriately chosen threshold. The fastText models are used together along with other quality annotators.
- Quality Classifier
The fastText model takes as input text and classifies whether the text is "high-quality" (labeled as
Bloom filter built on the document ids contained in GneissWeb. This can be used to recreate GneissWeb using the document ids from FineWeb 1.1.0 or any other version of Commoncrawl. This filter offers a way to determine which documents of FineWeb 1.1.0 or Commoncrawl are part of GneissWeb. This example shows how to apply the bloom filter on any parquet file. The Bloom annotator transform assigns a label of
1
if the document is present in the GneissWeb Bloom filter; otherwise, it assigns0
. This approach provides a clear understanding of which documents in FineWeb 1.1.0 are also present in GneissWeb and which are not. Theid
column in FineWeb 1.1.0 looks like this:<urn:uuid:39147604-bfbe-4ed5-b19c-54105f8ae8a7>
. The bloom filter is of the rbloom type and of size28 GB
. Identification of the documents via the bloom filter would get to an approximation of GneissWeb because the "Exact substring deduplication" step is not being applied, which changes the content of documents. Applying "Exact substring deduplication" on top of the bloom filter will lead to a mcuh better approximation of the GneissWeb dataset.Data Prep Kit transforms: Rep_removal, Classifications, Extreme_tokenized, Readability
Notebook to recreate GneissWeb using the methods described above
Notebook to recreate GneissWeb using a bloom filter built on the document ids of GneissWeb
- Downloads last month
- 309