JunyiZou commited on
Commit
cc85dcc
·
verified ·
1 Parent(s): eebaf76

Organize Phase 1 shards and refresh the dataset card

Browse files
README.md CHANGED
@@ -1,39 +1,76 @@
1
  ---
2
- license: apache-2.0
 
 
 
 
 
 
 
 
 
 
3
  ---
4
 
5
  # Cayley-Math
6
 
7
- Cayley-Math is the private mirror of the reviewed mathematics pool for [MMLA-Anholon-Pretrain](https://huggingface.co/datasets/MMLA-ORG/MMLA-Anholon-Pretrain). It supports from-scratch pretraining of a 1.481B Transformer–MMLA model. The first-round mathematics target is 50 million tokens that contribute to the training loss, within the main repository's one-billion-token first round.
8
 
9
- ## Status
10
 
11
- Mathematics sources are being prepared and reviewed. Admitted corpus shards and measured supervision are pending. The [synthetic mathematics record](examples/synthetic-math-record.md) illustrates the format using original prose. It has no assigned split and contributes zero tokens to the corpus. The first-round count will use the frozen 32,768-piece tokenizer and the labels that remain after masking and packing.
 
 
 
 
12
 
13
- ## Record format
14
 
15
- The normalized input format is UTF-8 JSONL, with one record per line.
16
 
17
- | Field | Meaning |
18
- | --- | --- |
19
- | `text` | Cleaned mathematical prose with retained formulas. |
20
- | `group` | Stable work or source-family identifier used to keep related editions and passages in the same split. |
21
- | `license` | Applicable source license for the passage, supported by the batch's terms and attribution evidence. |
 
 
 
22
 
23
- The example's `example_only` value is a format placeholder. Corpus records carry source-specific license and attribution information.
24
 
25
- ## Formula preservation and review
26
 
27
- Preparation starts from fixed originals. Depending on the source, static projection preserves mathematical content from TeX, PreTeXt, or structured XML and MathML. A passage's provenance identifies the work and edition, original member and location, applicable terms, and projection evidence. Formula evidence records the retained UTF-8 byte ranges and their SHA-256 digests so the normalized formulas can be checked against the documented transformation. Attribution records the source link, credit, and relevant changes made during extraction.
28
 
29
- Train, validation, and test are assigned by group before packing. Related editions and passages within a source family stay together. Cross-pool review checks for overlapping material and split conflicts. Exact duplicate checks, near-duplicate candidate review, and benchmark protection checks govern retained scope. Passages with unresolved attribution or uncertain source scope remain held for review.
30
 
31
- ## Shards, manifests, and access
 
 
 
32
 
33
- Each synchronized batch identifies the split, exact file paths, byte sizes, SHA-256 digests, source versions, and attribution. After data admission and private hosting review, the same mathematics shard bytes, split labels, and accompanying attribution are copied to both private repositories. The batch manifest and synchronization record bind both repository commits. The mirror is a second copy of the same mathematics data.
34
 
35
- For reproducible access, use an authorized Hugging Face account and the full Cayley-Math dataset commit named in the synchronization record. Retrieve the batch manifest and the files it lists at that commit. Verify their sizes and SHA-256 digests against the manifest. The same values can be checked against the corresponding commit in MMLA-Anholon-Pretrain.
 
 
 
 
 
 
 
 
 
 
 
36
 
37
- ## Scope and source licenses
38
 
39
- Cayley-Math covers the pretraining mathematics pool. Math evaluation data and later-stage supervision have separate preparation and evaluation contracts. The repository-level license metadata is separate from the source licenses documented with each batch.
 
 
 
 
 
 
 
1
  ---
2
+ pretty_name: Cayley Math
3
+ language:
4
+ - en
5
+ - zh
6
+ license: other
7
+ task_categories:
8
+ - text-generation
9
+ tags:
10
+ - pretraining
11
+ - language-modeling
12
+ - mathematics
13
  ---
14
 
15
  # Cayley-Math
16
 
17
+ Cayley-Math contains the mathematics portion of Phase 1 for [MMLA Anholon Pretrain](https://huggingface.co/datasets/MMLA-ORG/MMLA-Anholon-Pretrain). The two private repositories carry the same mathematics archive, manifest, tokenizer, and attribution files. Use this repository when a run needs only the mathematics subset.
18
 
19
+ ## Dataset Summary
20
 
21
+ | Split | Loss-bearing labels | Packed rows |
22
+ | --- | ---: | ---: |
23
+ | Train | 50,000,000 | 43,833 |
24
+ | Development | 1,024 | 1 |
25
+ | Test | 1,024 | 1 |
26
 
27
+ 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.
28
 
29
+ ## Repository Structure
30
 
31
+ ```text
32
+ phase1/
33
+ ├── math/ # Mathematics archive and packed manifest
34
+ ├── attribution/ # Document-level sources, licenses, and notices
35
+ └── upload-manifest.json # Archive hashes and repository-relative paths
36
+ tokenizer/ # SentencePiece model and vocabulary
37
+ examples/ # Synthetic illustration of a source record
38
+ ```
39
 
40
+ ## Data Fields
41
 
42
+ 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.
43
 
44
+ ## Loading the Data
45
 
46
+ Authenticate with a Hugging Face account that can read this repository. Set `HF_DATA_REVISION` to a commit SHA for reproducible access.
47
 
48
+ ```python
49
+ import os
50
+ import subprocess
51
+ from pathlib import Path
52
 
53
+ from huggingface_hub import snapshot_download
54
 
55
+ root = Path(snapshot_download(
56
+ repo_id="MMLA-ORG/Cayley-Math",
57
+ repo_type="dataset",
58
+ revision=os.environ.get("HF_DATA_REVISION", "main"),
59
+ endpoint="https://huggingface.co",
60
+ token=True,
61
+ allow_patterns=["phase1/math/**", "phase1/upload-manifest.json", "tokenizer/**"],
62
+ local_dir="cayley-phase1",
63
+ ))
64
+ math = root / "phase1" / "math"
65
+ subprocess.run(["tar", "--zstd", "-xf", str(math / "math.tar.zst"), "-C", str(math)], check=True)
66
+ ```
67
 
68
+ Use `math/manifest.json` to locate and verify the extracted arrays. Development and test are small monitoring splits.
69
 
70
+ ## Preparation and Source Terms
71
+
72
+ The mathematics view uses the same source groups and split assignments as the complete pack. At source boundaries, only mathematics rows enter the math-only arrays. Its 50 million training labels are already counted in Anholon's one billion.
73
+
74
+ 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/`.
75
+
76
+ For research records, cite MMLA-ORG, *Cayley-Math*, Phase 1, and the Hugging Face revision used. See the [MMLA project](https://mmla-org.github.io/) for the model family.
{p1/20261111-1b-packed → phase1}/README.md RENAMED
File without changes
{p1/20261111-1b-packed → phase1}/attribution/math-rights/math-attribution.jsonl.gz RENAMED
File without changes
{p1/20261111-1b-packed → phase1}/attribution/math-rights/stacks-CONTRIBUTORS RENAMED
File without changes
{p1/20261111-1b-packed → phase1}/attribution/math-rights/stacks-COPYING RENAMED
File without changes
{p1/20261111-1b-packed → phase1}/attribution/math-rights/stacks-introduction.tex RENAMED
File without changes
{p1/20261111-1b-packed → phase1}/math/manifest.json RENAMED
File without changes
{p1/20261111-1b-packed → phase1}/math/math.tar.zst RENAMED
File without changes
{p1/20261111-1b-packed → phase1}/upload-manifest.json RENAMED
@@ -1,31 +1,32 @@
1
  {
2
  "source_manifest_sha256": "8affc5c5feea945f246ef170254e1577f68ffbf0268cd9ba2dbce0c1355b8be0",
 
3
  "files": {
4
- "README.md": {
5
  "bytes": 2944,
6
  "sha256": "879331c27c9c9fa7a5cd3c3ec065e44e5be3b32bd77e5401520d28b928f7d955"
7
  },
8
- "attribution/math-rights/math-attribution.jsonl.gz": {
9
  "bytes": 1351793,
10
  "sha256": "fa6021e2da3d678918a26793705273d3c8e71111d7dab71efb878dd51445099a"
11
  },
12
- "attribution/math-rights/stacks-CONTRIBUTORS": {
13
  "bytes": 10329,
14
  "sha256": "3aae5a471106a0e922e7e523bc2956c764a2c3127957bd864ea7866c27fd4cf8"
15
  },
16
- "attribution/math-rights/stacks-COPYING": {
17
  "bytes": 20404,
18
  "sha256": "4b2c8fc390f802cd92f0622dc00a708a588bec54d0145d2ee135d6d7672bfe85"
19
  },
20
- "attribution/math-rights/stacks-introduction.tex": {
21
  "bytes": 6560,
22
  "sha256": "43abd6493bf48325878d6573966e97025770d4b4e12db1dda31da7fd181d4acf"
23
  },
24
- "math/manifest.json": {
25
  "bytes": 175349,
26
  "sha256": "b09db946a42ccf762d92fc4f482d6c2bfc9894a1efdb2eed57fae6a4f3885b00"
27
  },
28
- "math/math.tar.zst": {
29
  "bytes": 92452277,
30
  "sha256": "ecce26d922dc11a295d0b35286719a5ae9c4b38548115f4dcd4f4bac5abb6f4c"
31
  },
@@ -36,6 +37,10 @@
36
  "tokenizer/tokenizer.vocab": {
37
  "bytes": 457739,
38
  "sha256": "5ed89ba3ac20243fecf1a8945a7d21e41a9a39e7ff3dfc1a584889360a92a646"
 
 
 
 
39
  }
40
  }
41
  }
 
1
  {
2
  "source_manifest_sha256": "8affc5c5feea945f246ef170254e1577f68ffbf0268cd9ba2dbce0c1355b8be0",
3
+ "original_dataset_revision": "eebaf76b125a9972ab7d9303b879a03192084844",
4
  "files": {
5
+ "phase1/README.md": {
6
  "bytes": 2944,
7
  "sha256": "879331c27c9c9fa7a5cd3c3ec065e44e5be3b32bd77e5401520d28b928f7d955"
8
  },
9
+ "phase1/attribution/math-rights/math-attribution.jsonl.gz": {
10
  "bytes": 1351793,
11
  "sha256": "fa6021e2da3d678918a26793705273d3c8e71111d7dab71efb878dd51445099a"
12
  },
13
+ "phase1/attribution/math-rights/stacks-CONTRIBUTORS": {
14
  "bytes": 10329,
15
  "sha256": "3aae5a471106a0e922e7e523bc2956c764a2c3127957bd864ea7866c27fd4cf8"
16
  },
17
+ "phase1/attribution/math-rights/stacks-COPYING": {
18
  "bytes": 20404,
19
  "sha256": "4b2c8fc390f802cd92f0622dc00a708a588bec54d0145d2ee135d6d7672bfe85"
20
  },
21
+ "phase1/attribution/math-rights/stacks-introduction.tex": {
22
  "bytes": 6560,
23
  "sha256": "43abd6493bf48325878d6573966e97025770d4b4e12db1dda31da7fd181d4acf"
24
  },
25
+ "phase1/math/manifest.json": {
26
  "bytes": 175349,
27
  "sha256": "b09db946a42ccf762d92fc4f482d6c2bfc9894a1efdb2eed57fae6a4f3885b00"
28
  },
29
+ "phase1/math/math.tar.zst": {
30
  "bytes": 92452277,
31
  "sha256": "ecce26d922dc11a295d0b35286719a5ae9c4b38548115f4dcd4f4bac5abb6f4c"
32
  },
 
37
  "tokenizer/tokenizer.vocab": {
38
  "bytes": 457739,
39
  "sha256": "5ed89ba3ac20243fecf1a8945a7d21e41a9a39e7ff3dfc1a584889360a92a646"
40
+ },
41
+ "README.md": {
42
+ "bytes": 3192,
43
+ "sha256": "36f656a5ab4d3a528a6ff0112aee8d289e6165fa52abda6d724f6802213a9955"
44
  }
45
  }
46
  }
{p1/20261111-1b-packed/tokenizer → tokenizer}/tokenizer.model RENAMED
File without changes
{p1/20261111-1b-packed/tokenizer → tokenizer}/tokenizer.vocab RENAMED
File without changes