agentlans's picture
Upload 3 files
753f783 verified
|
Raw
History Blame Contribute Delete
5.71 kB
metadata
license: apache-2.0
language:
  - en
tags:
  - text-classification
  - web-corpus
  - balanced-dataset
size_categories:
  - 100k<n<1M

Unofficial m-a-p/FineFineWeb Equal Weighted Sample

A balanced, class-weighted subset of m-a-p/FineFineWeb optimized for multi-class text classification tasks.

πŸ“Š Dataset Overview

To prevent class imbalance issues during model training, this dataset extracts an equal-weighted sample across all fine-grained domain classes.

  • Original Dataset: m-a-p/FineFineWeb
  • Total Samples: 134,000 (0 duplicates)
  • Training Set (85%): 113,900 rows
  • Validation Set (15%): 20,100 rows
  • Classes: 67 balanced domains (2,000 samples per class)

πŸš€ Quick Start

Load the dataset easily using the Hugging Face datasets library:

from datasets import load_dataset

dataset = load_dataset("agentlans/finefineweb-equal-weighted")
print(dataset["train"][0])

πŸ“‚ Data Structure

Each row contains text metadata, source tracking information, and the assigned domain label (domain).

Example Row

{
  "url": "https://lothbury.exchange/parson-desires-cure-fund-for-local-utilities/",
  "date": "2023-03-27T13:42:03Z",
  "file_path": "s3://commoncrawl/crawl-data/CC-MAIN-2023-14/segments/1679296948632.20/warc/CC-MAIN-20230327123514-20230327153514-00428.warc.gz",
  "language_score": 0.93825,
  "token_count": 894,
  "dump": "CC-MAIN-2023-14",
  "global_id": "webtext-fineweb__CC-MAIN-2023-14__0__10195829",
  "lang": "en",
  "text": "Mike Parson is actually asking for an emergency therapy account...",
  "domain": "journalism_and_media_communication",
  "round": 1,
  "source": "journalism_and_media_communication/journalism_and_media_communication_001222.jsonl"
}

Note: The source field indicates the exact origin file from which the row was pulled.

πŸ“‹ Class Distribution

All 67 categories maintain a strict 1:1 balance of 1,700 training samples and 300 validation samples (2,000 total per class).

Label Train Validation Total
aerospace 1700 300 2000
agronomy 1700 300 2000
artistic 1700 300 2000
astronomy 1700 300 2000
atmospheric_science 1700 300 2000
automotive 1700 300 2000
beauty 1700 300 2000
biology 1700 300 2000
celebrity 1700 300 2000
chemistry 1700 300 2000
christianity 1700 300 2000
civil_engineering 1700 300 2000
communication_engineering 1700 300 2000
computer_science_and_technology 1700 300 2000
design 1700 300 2000
drama_and_film 1700 300 2000
economics 1700 300 2000
electronic_science 1700 300 2000
entertainment 1700 300 2000
environmental_science 1700 300 2000
fashion 1700 300 2000
finance 1700 300 2000
food 1700 300 2000
gamble 1700 300 2000
game 1700 300 2000
geography 1700 300 2000
health 1700 300 2000
history 1700 300 2000
hobby 1700 300 2000
hydraulic_engineering 1700 300 2000
instrument_science 1700 300 2000
journalism_and_media_communication 1700 300 2000
landscape_architecture 1700 300 2000
law 1700 300 2000
library 1700 300 2000
literature 1700 300 2000
materials_science 1700 300 2000
mathematics 1700 300 2000
mechanical_engineering 1700 300 2000
medical 1700 300 2000
mining_engineering 1700 300 2000
movie 1700 300 2000
music_and_dance 1700 300 2000
news 1700 300 2000
nuclear_science 1700 300 2000
ocean_science 1700 300 2000
optical_engineering 1700 300 2000
painting 1700 300 2000
pet 1700 300 2000
petroleum_and_natural_gas_engineering 1700 300 2000
philosophy 1700 300 2000
photo 1700 300 2000
physics 1700 300 2000
politics 1700 300 2000
psychology 1700 300 2000
public_administration 1700 300 2000
relationship 1700 300 2000
sociology 1700 300 2000
sports 1700 300 2000
statistics 1700 300 2000
systems_science 1700 300 2000
textile_science 1700 300 2000
topicality 1700 300 2000
transportation_engineering 1700 300 2000
travel 1700 300 2000
urban_planning 1700 300 2000
weapons_science 1700 300 2000
Total 113900 20100 134000

πŸ“ License & Citation

This sample is distributed under the Apache 2.0 License.

If you use this balanced dataset in your research or applications, please cite the original FineFineWeb authors:

@misc{map2024finefineweb,
  title={FineFineWeb: A Comprehensive Study on Fine-grained Domain Web Corpus},
  url={https://huggingface.co/datasets/m-a-p/FineFineWeb},
  author={Zhang, Ge and Du, Xinrun and Yu, Zhimiao and Wang, Zili and Wang, Zekun and Guo, Shuyue and Zheng, Tianyu and Zhu, Kang and Liu, Jerry and Yue, Shawn and Liu, Binbin and Peng, Zhongyuan and Yao, Yifan and Yang, Jack and Li, Ziming and Zhang, Bingni and Liu, Minghao and Liu, Tianyu and Gao, Yang and Chen, Wenhu and Zhou, Xiaohuan and Liu, Qian and Wang, Taifeng and Huang, Wenhao},
  publisher={Hugging Face},
  version={v0.1.0},
  month={December},
  year={2024}
}

See Also

agentlans/m-a-p-FineFineWeb-sample which is unbalanced but has more rows