zykan's picture
Add files using upload-large-folder tool
9a24217 verified
|
Raw History Blame Contribute Delete
8.91 kB
metadata
language:
  - en
license: other
license_name: source-specific-terms
license_link: >-
  https://huggingface.co/datasets/zykan/pretraining-skill-annotations-2m#source-attribution-and-terms
task_categories:
  - text-classification
pretty_name: Pretraining Skill Annotations — FineWeb-Edu and RedPajama v2
size_categories:
  - 1M<n<10M
tags:
  - skill-annotation
  - machine-annotated
  - pretraining
  - qwen3
configs:
  - config_name: fineweb_edu
    data_files:
      - split: train
        path: data/fineweb_edu/train-*.parquet
  - config_name: redpajama_v2
    data_files:
      - split: train
        path: data/redpajama_v2/train-*.parquet

Pretraining Skill Annotations: FineWeb-Edu and RedPajama v2

This release contains a lossless aggregation of the finalized Parquet exports of two million-document annotation runs: one million FineWeb-Edu documents and one million RedPajama v2 documents. Each row includes the complete source text in context, an English skills list, annotation status, and provenance fields.

The repository is public, as requested by its owner after initial private preparation. The labels are generated by Qwen3-4B-Instruct-2507 using parent_inclusive revision 4. Engineering validation is complete; independent human semantic accuracy has not been established. Labels are candidate content/skill annotations, not measured training-token exposure or verified learning prerequisites.

Contents and counts

Configuration Input rows Successful, nonempty Successful, empty Generation failed Parquet files
fineweb_edu 1,000,000 999,579 117 304 10
redpajama_v2 1,000,000 968,878 30,617 505 10

All original input rows are retained. A successful empty list means the annotator returned no qualifying label. A generation failure is separately marked and must not be interpreted as a successful empty annotation.

The split is named train for loading convenience. It does not claim that a leakage-controlled model-training/evaluation split has been established.

Load the data

The repository is public. Select a configuration; authentication is not required:

from datasets import load_dataset

fineweb = load_dataset(
    "zykan/pretraining-skill-annotations-2m", "fineweb_edu", split="train", token=False, streaming=True
)
row = next(iter(fineweb))
print(row["context"])
print(row["skills"])
print(row["status"])

redpajama = load_dataset(
    "zykan/pretraining-skill-annotations-2m", "redpajama_v2", split="train", token=False, streaming=True
)

# Keep successful rows, including legitimate empty lists:
successful = fineweb.filter(lambda row: row["status"] == "successful")

The text field is named context, not text. The original export schema is preserved:

Field Type Meaning
doc_id string Frozen annotation document identifier; FW1M prefix or RPV2 prefix
sample_index int64 Index within this source's million-document input; not a shared cross-source index
context string Complete source text; no truncation or segmentation
skills list of strings Raw model-generated English labels; inspect status before use
status string successful or generation_failed
input_tokens int64 Annotation chat input length, including prompt/examples; not pretraining target-token exposure
source_global_row int64 Row coordinate assigned by the source sampler; interpret within its source
url string Original webpage URL
prompt_sha256 string Actual per-document system prompt hash
prompt_package_sha256 string Frozen preview/package identity; differs from the per-document prompt hash
input_chat_sha256 string Full rendered annotation chat hash
example_ids list of strings The three demonstration IDs in their actual order
example_seed int64 Seed used to choose demonstrations

Annotation method

The annotator identifies the main knowledge and task skills needed to produce content with equivalent substance/function and accuracy, or solve the problems in the document. Knowledge domains qualify as skills. Reusable medium-grained English labels and clearly supported is-a ancestors are retained together in a flat list. The list does not explicitly encode parent edges.

The annotation model is the local Qwen3-4B-Instruct-2507 checkpoint, using float16, temperature 0, generation seed 20261009 and disabled thinking. The first output allowance is 1,024 tokens; invalid/incomplete outputs are retried on the same input with 2,048 tokens. Context routing uses 16,384 / 32,768 / 65,536 / 147,456 windows, reserving 2,048 output tokens and 256 safety tokens.

Each document receives three demonstrations drawn from distinct groups of a frozen 24-example pool. Selection uses seed 42 and the document ID; exact, contained, and same-source-document examples are excluded. Selected example IDs and actual prompt hashes are retained in each row.

The byte-exact frozen preview, template, example pool and renderer are included in prompts/. The preview is not the actual prompt used for every document. Reconstruct an individual system prompt with the included renderer:

import hashlib
import importlib.util
from pathlib import Path

prompt_dir = Path("prompts")  # downloaded from this repository
spec = importlib.util.spec_from_file_location("frozen_prompt", prompt_dir / "render_prompt.py")
module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module)
prompt, selection = module.build_prompt(
    row["example_seed"], row["doc_id"], 3,
    passage=row["context"], directory=prompt_dir, target_doc_id=row["doc_id"]
)
assert hashlib.sha256(prompt.encode()).hexdigest() == row["prompt_sha256"]
assert selection["example_ids"] == row["example_ids"]

Source sampling

FineWeb-Edu: a uniform, without-replacement seed-42 sample of source rows from sample-10BT, revision 87f09149ef4734204d70ed1d046ddc9ca3f2b8f9, containing 9,672,101 source records. Extra identical text records were retained: 4,559. No sampled document exceeded the complete annotation context.

RedPajama v2: the 2023-06 English head/middle data, with the official listing pinned to aa033f6b6480c445557e9118283993403f069f6a. First, 24 of 5,000 shard IDs were drawn without replacement using seed 42; their head and middle files form 48 complete text files. Official duplicate IDs were excluded. One million documents were then chosen by SHA256("42:"+official_doc_id) priority from 1,514,025 eligible candidates. Fifty-six over-context candidates were recorded and replaced by later-priority candidates before the input was frozen. Extra identical text records were retained: 2,734.

The RedPajama selection is a two-stage sample, not a uniform document sample over all RedPajama v2. Neither configuration is described as one million deduplicated unique texts. Generation failures were not replaced by different documents.

Provenance and validation

manifest.json lists every uploaded Parquet file, its SHA256, byte size and row count, plus sampling/model/prompt metadata and original batch-manifest hashes. The release aggregates the 4,004 original export files into 20 larger Parquet shards, ten per source (about 200 MB per shard on average). All row values and columns are preserved. The original export inventory and checksums are included in provenance/original_export_manifest.json; the new manifest maps each aggregate shard to its original files.

Release preparation compares every output row group with its original full Arrow table across all columns, then checks all output hashes, export schemas, row counts, statuses, per-source sample-index coverage and document-ID uniqueness. Prompt reconstruction is checked on a sample from each source. These are engineering checks and do not establish semantic correctness, a power law, a valid semantic tree, or a causal relationship between skill frequency and model loss.

Full raw annotation attempts and operational logs remain in the original local experiment batches. This repository contains the finalized exports and the frozen prompt reconstruction assets.

Source attribution and terms

  • FineWeb-Edu identifies its database license as ODC-By. Attribution and upstream conditions are retained.
  • RedPajama-Data-V2 refers text-data users to the Common Crawl Terms of Use; its code license must not be confused with a blanket license for all collected text.
  • Underlying webpages may carry their own rights and terms. This annotation upload does not replace or broaden the upstream permissions. No single new blanket text license is asserted for the combined repository.