--- pretty_name: Cayley Math language: - en - zh license: other task_categories: - text-generation tags: - pretraining - language-modeling - mathematics configs: - config_name: phase1-preview default: true data_files: - split: train path: phase1/preview/*.parquet - config_name: openai-math data_files: - split: train path: components/openai-math/data/train.parquet - split: validation path: components/openai-math/data/dev.parquet - split: test path: components/openai-math/data/test.parquet --- # Cayley-Math Cayley-Math is a collaboratively maintained collection of mathematical text for language-model research. Contributors can publish cleaned collections as separately versioned components. The first component is a frozen mirror of the mathematics subset prepared for Anholon Phase 1. | Collection | Location | Maintenance | | --- | --- | --- | | Anholon Phase 1 mathematics mirror | [Phase 1 bundle](phase1/README.md) | Anholon data maintainers | | OpenAI mathematics manuscripts | [OpenAI Math component](components/openai-math/README.md) | Source extraction and OMP DeepSeek metadata | | Contributed mathematics collections | [Component guide](components/README.md) | Each component's contributors | ## Phase 1 Files | Use | Files | Coverage | | --- | --- | --- | | Train with the frozen release | [NumPy archives](https://huggingface.co/datasets/MMLA-ORG/Cayley-Math/tree/main/phase1/math) | 50,000,000 training labels | | Inspect examples | [Parquet preview](https://huggingface.co/datasets/MMLA-ORG/Cayley-Math/tree/main/phase1/preview) | 4 excerpts from the training split | | Trace sources and terms | [Source catalog](phase1/sources.json) · [Attribution guide](phase1/attribution/README.md) | All included components | ## Phase 1 Summary | Split | Loss-bearing labels | Packed rows | | --- | ---: | ---: | | Train | 50,000,000 | 43,833 | | Development | 1,024 | 1 | | Test | 1,024 | 1 | Sources include mathematical arXiv passages cached by Common Pile, excerpts from the Stacks Project, and textbooks by Wen-Wei Li. Each window has up to 2,048 token positions and uses the same 32,768-piece SentencePiece vocabulary as the full corpus. ## Repository Structure ```text phase1/ ├── math/ # Mathematics archive and packed manifest ├── attribution/ # Document-level sources, licenses, and notices ├── preview/ # Parquet excerpts ├── sources.json # Component counts and provenance references └── upload-manifest.json # File sizes and hashes by repository path components/ # Independently contributed collections tokenizer/ # SentencePiece model and vocabulary for Phase 1 examples/ # Synthetic illustration of a source record ``` ## Data Preview The Parquet preview contains **4 excerpts** decoded from frozen training windows. Each excerpt contains up to 192 tokens and includes its domain, source, license, and packed row number. The files are under [`phase1/preview/`](https://huggingface.co/datasets/MMLA-ORG/Cayley-Math/tree/main/phase1/preview). | Domain | Example excerpt | Source | | --- | --- | --- | | Mathematics | , we start with the notion of joint transitivity. ###### Definition 1.4. Let $(X,S_{1},\ldots,S_{k})$ be a $\mathbb{Z}^{k}$-system, $T_{1},\ldots,T_{d}\in\langl… | [Upstream](https://arxiv.org/abs/2404.07876) | The preview uses four fixed row offsets per domain at 20%, 40%, 60%, and 80% of its packed training rows. Each excerpt includes up to 192 tokens. The `packed_row` field is a zero-based index into Anholon's full Phase 1 train split, including in the mathematics mirror. ```python import pyarrow.parquet as pq from huggingface_hub import hf_hub_download preview = hf_hub_download( repo_id="MMLA-ORG/Cayley-Math", repo_type="dataset", filename="phase1/preview/math.parquet", endpoint="https://huggingface.co", ) table = pq.read_table(preview) ``` ## Data Fields Each shard contains three `int32` arrays with shape `[rows, 2048]`. The `input_ids` array uses zero for padding. The `labels` array stores shifted targets and masks unused positions with `-100`. The `role_ids` array is zero throughout plain pretraining text. ## Loading the Training Pack Set `HF_DATA_REVISION` to a commit SHA for reproducible access. The bundle uses the included Phase 1 tokenizer. ```python import os import subprocess from pathlib import Path from huggingface_hub import snapshot_download root = Path(snapshot_download( repo_id="MMLA-ORG/Cayley-Math", repo_type="dataset", revision=os.environ.get("HF_DATA_REVISION", "main"), endpoint="https://huggingface.co", allow_patterns=["phase1/math/**", "phase1/upload-manifest.json", "tokenizer/**"], local_dir="cayley-phase1", )) math = root / "phase1" / "math" subprocess.run(["tar", "--zstd", "-xf", str(math / "math.tar.zst"), "-C", str(math)], check=True) ``` Use `math/manifest.json` to locate and verify the extracted arrays. Development and test are small monitoring splits. ## Processing and Source Terms The Phase 1 mirror preserves the original mathematics group assignments, splits and training labels. When building a new training mix from Cayley-Math, record the selected commit, component paths and file digests. Check overlap with any existing Anholon mathematics data before combining the components. Source terms are recorded per document. Common Pile arXiv text and Wen-Wei Li excerpts retain their applicable Creative Commons terms. The Stacks Project passages retain GFDL 1.2 or later. See the [batch notes](phase1/README.md) and attribution and notices in `phase1/attribution/math-rights/`. ## Citation and Revision For research records, cite MMLA-ORG, *Cayley-Math*, the component and its Hugging Face revision. Cite the component's upstream works as listed in its attribution. See the [MMLA project](https://mmla-org.github.io/) for the model family.