Datasets:
File size: 5,980 Bytes
87ab091 cc85dcc 24a1655 1adafd0 87ab091 f8eecad 5b86301 f8eecad 5b86301 1adafd0 5b86301 095dfd5 5b86301 f8eecad cc85dcc f8eecad cc85dcc f8eecad cc85dcc f8eecad cc85dcc 095dfd5 5b86301 cc85dcc f8eecad 24a1655 095dfd5 24a1655 cc85dcc 0fc741c cc85dcc 0fc741c 095dfd5 0fc741c 5b86301 0fc741c cc85dcc 0fc741c cc85dcc 0fc741c cc85dcc 0fc741c cc85dcc 0fc741c 095dfd5 cc85dcc 5b86301 cc85dcc 095dfd5 5b86301 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | ---
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.
|