license: odc-by
task_categories:
- text-generation
language:
- en
pretty_name: FineWebMini
size_categories:
- n>1B
FineWeb Miniseries Dataset
The FineWeb Miniseries Dataset is a collection of random subsets of the FineWeb dataset, created for training and experimenting with language models of different sizes. The subsets are generated based on target token counts, providing a range of dataset sizes suitable for various computational resources and research purposes.
Inspiration
The FineWeb Miniseries Dataset was inspired by a tweet from Andrej Karpathy (@karpathy) on May 4, 2024, where he was looking for a manageable ~1GB sample of a larger dataset for debugging and mentioned the idea of having subsets at different scales. The goal of the FineWeb Miniseries Dataset is to make experimenting with large language models more approachable for the GPU & Disk Poor.
Dataset Subsets
The dataset consists of the following subsets:
- 1B: A subset containing approximately 1 billion GPT2 tokens.
- 10B: A subset containing approximately 10 billion GPT2 tokens.
- 100B: A subset containing approximately 100 billion GPT2 tokens.
- 350B: A subset containing approximately 350 billion GPT2 tokens.
Each subset is created by randomly sampling rows from the original FineWeb dataset while maintaining the average GPT2 tokens per row. The random sampling is performed with a fixed seed (42) to ensure reproducibility.
Usage
To use the FineWeb Miniseries Dataset, you can load the desired subset using the Hugging Face Datasets library. Here's an example of how to load a subset:
from datasets import load_dataset
# Load the "1B" subset
subset_1b = load_dataset("yentinglin/fineweb_miniseries", "1B")
Replace "1B"
with the desired subset name ("10B"
, "100B"
, or "350B"
) to load the corresponding subset.
Dataset Creation
The subsets of the FineWeb Miniseries Dataset are created using the following code:
from datasets import load_dataset
# Load the "fineweb" dataset
fw = load_dataset("HuggingFaceFW/fineweb")
# Calculate the average GPT2 tokens per row
average_tokens_per_row = 15352.9e9 / 22335106879
# Define the target token counts for each subset
target_token_counts = [1e9, 10e9, 100e9, 350e9]
# Shuffle the dataset
shuffled_dataset = fw.shuffle(seed=42)
# Create and push the subsets to the Hugging Face Hub
for target_tokens in target_token_counts:
# Calculate the number of rows needed for the target token count
num_rows = int(target_tokens / average_tokens_per_row)
# Select a random subset of the shuffled dataset
subset = shuffled_dataset.select(range(num_rows))
# Push the subset to the Hugging Face Hub
subset_name = f"{int(target_tokens/1e9)}B"
subset.push_to_hub(f"yentinglin/fineweb_miniseries", subset_name)
print(f"Pushed {subset_name} subset to the Hugging Face Hub.")
Original Dataset
The FineWeb Miniseries Dataset is derived from the original FineWeb dataset, which can be found at HuggingFaceFW/fineweb. The original dataset contains a large collection of web pages suitable for training language models.
License
The FineWeb Miniseries Dataset is released under the same license as the original FineWeb dataset. Please refer to the original dataset's license for more information.
Citation
If you use the FineWeb Miniseries Dataset in your research or projects, please cite the original FineWeb dataset:
@software{penedo2024fineweb,
author = {Penedo, Guilherme and Kydlíček, Hynek and von Werra, Leandro and Wolf, Thomas},
title = {FineWeb},
month = April,
year = 2024,
doi = { 10.57967/hf/2092 },
url = {https://huggingface.co/datasets/HuggingFaceFW/fineweb}
}
Feel free to customize the README based on your specific requirements and add any additional information that you think would be helpful for users of the FineWeb Miniseries Dataset.