ruthvikanne commited on
Commit
119c031
·
verified ·
1 Parent(s): 568b4f2

part 1: books, algorithms, mathematics, architecture

Browse files
LICENSES.json ADDED
@@ -0,0 +1,147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "aosa": {
3
+ "declared": "CC-BY-3.0",
4
+ "evidence": "https://aosabook.org/en/ 'License and Royalties' + repo LICENSE.md",
5
+ "topics": [
6
+ "design",
7
+ "architecture",
8
+ "performance"
9
+ ],
10
+ "commit": "12308deff812eb3a4fa4e210ae5496e154961311",
11
+ "url": "https://github.com/aosabook/aosabook",
12
+ "restricted": false,
13
+ "risk": "clean"
14
+ },
15
+ "cp-algorithms": {
16
+ "declared": "CC-BY-SA-4.0",
17
+ "evidence": "GitHub licence API: CC-BY-SA-4.0",
18
+ "bucket": "algorithms",
19
+ "commit": "bbbbb6f04e5c9a665c8477ec68ee4f28b1367dd7",
20
+ "url": "https://github.com/cp-algorithms/cp-algorithms",
21
+ "restricted": false,
22
+ "risk": "clean"
23
+ },
24
+ "discrete-book": {
25
+ "declared": "CC-BY-NC-SA-4.0",
26
+ "evidence": "repo LICENSE: 'fourth edition ... CC BY-NC-SA 4.0'; older editions differ, so this is treated as NC",
27
+ "bucket": "math",
28
+ "commit": "2d28f5dee1370beeed729d3712d53638597885dd",
29
+ "url": "https://github.com/oscarlevin/discrete-book",
30
+ "restricted": true,
31
+ "risk": "nc"
32
+ },
33
+ "miaow": {
34
+ "declared": "BSD-3-Clause",
35
+ "evidence": "GitHub licence API: BSD-3-Clause",
36
+ "bucket": "arch_code",
37
+ "commit": "dbc5d7cc6e5fd58828239b59491eeb4f66503074",
38
+ "url": "https://github.com/VerticalResearchGroup/miaow",
39
+ "restricted": false,
40
+ "risk": "clean"
41
+ },
42
+ "ods": {
43
+ "declared": "CC-BY-2.5-CA",
44
+ "evidence": "https://opendatastructures.org/ 'released under a Creative Commons Attribution License' + repo COPYING",
45
+ "topics": [
46
+ "algorithms",
47
+ "data-structures"
48
+ ],
49
+ "commit": "9d22c44906dda2017b2ef0c762025bee644b58aa",
50
+ "url": "https://github.com/patmorin/ods",
51
+ "restricted": false,
52
+ "risk": "clean"
53
+ },
54
+ "ods-code": {
55
+ "declared": "CC-BY-2.5-CA",
56
+ "evidence": "repo COPYING: 'released under a Creative Commons Attribution license'",
57
+ "bucket": "algorithms",
58
+ "commit": "9d22c44906dda2017b2ef0c762025bee644b58aa",
59
+ "url": "https://github.com/patmorin/ods",
60
+ "restricted": false,
61
+ "risk": "clean"
62
+ },
63
+ "opencl-spec": {
64
+ "declared": "CC-BY-4.0",
65
+ "evidence": "repo LICENSE: 'asciidoctor sources ... CC BY 4.0'",
66
+ "topics": [
67
+ "gpu-architecture",
68
+ "api-design",
69
+ "specification"
70
+ ],
71
+ "commit": "0027b7f1a5e97b1bf5256888757479e012a5cb59",
72
+ "url": "https://github.com/KhronosGroup/OpenCL-Docs",
73
+ "restricted": false,
74
+ "risk": "clean"
75
+ },
76
+ "opentitan": {
77
+ "declared": "Apache-2.0",
78
+ "evidence": "GitHub licence API: Apache-2.0",
79
+ "bucket": "arch_code",
80
+ "commit": "41049e9deb40e0602cd5272c40398be380ae2637",
81
+ "url": "https://github.com/lowRISC/opentitan",
82
+ "restricted": false,
83
+ "risk": "clean"
84
+ },
85
+ "rocket-chip": {
86
+ "declared": "BSD-3-Clause OR Apache-2.0",
87
+ "evidence": "repo LICENSE.Berkeley (BSD-3-Clause) + LICENSE.SiFive (Apache-2.0), both read directly",
88
+ "bucket": "arch_code",
89
+ "commit": "ece7b9ad544b07df39cd13b6fd7236562a26355d",
90
+ "url": "https://github.com/chipsalliance/rocket-chip",
91
+ "restricted": false,
92
+ "risk": "clean"
93
+ },
94
+ "sdxpy": {
95
+ "declared": "CC-BY-NC-4.0",
96
+ "evidence": "repo LICENSE.md: 'written material ... CC-BY-NC-4.0'",
97
+ "topics": [
98
+ "design",
99
+ "testing",
100
+ "profiling"
101
+ ],
102
+ "commit": "469c08a8807c631cf0f4deea675782775cc83ac4",
103
+ "url": "https://github.com/gvwilson/sdxpy",
104
+ "restricted": true,
105
+ "risk": "nc"
106
+ },
107
+ "spike": {
108
+ "declared": "BSD-3-Clause",
109
+ "evidence": "repo LICENSE: BSD 3-clause (Regents of the University of California)",
110
+ "bucket": "arch_code",
111
+ "commit": "4c6a9bc79dab80616932949707e7c0471d8e9e54",
112
+ "url": "https://github.com/riscv-software-src/riscv-isa-sim",
113
+ "restricted": false,
114
+ "risk": "clean"
115
+ },
116
+ "thealgorithms-c": {
117
+ "declared": "GPL-3.0",
118
+ "evidence": "GitHub licence API: GPL-3.0",
119
+ "bucket": "algorithms",
120
+ "commit": "e5dad3fa8def3726ec850ca66a7f51521f8ad393",
121
+ "url": "https://github.com/TheAlgorithms/C",
122
+ "restricted": false,
123
+ "risk": "clean"
124
+ },
125
+ "vexriscv": {
126
+ "declared": "MIT",
127
+ "evidence": "GitHub licence API: MIT",
128
+ "bucket": "arch_code",
129
+ "commit": "baf7dc82f855eddaf5b0a20a6802c526f127e38a",
130
+ "url": "https://github.com/SpinalHDL/VexRiscv",
131
+ "restricted": false,
132
+ "risk": "clean"
133
+ },
134
+ "vulkan-spec": {
135
+ "declared": "CC-BY-4.0",
136
+ "evidence": "repo LICENSE.adoc: 'CC-BY-4.0 ... for specification source documents'",
137
+ "topics": [
138
+ "gpu-architecture",
139
+ "api-design",
140
+ "specification"
141
+ ],
142
+ "commit": "b94f8bd2d004d2949469d8a5071ee10eb7d23566",
143
+ "url": "https://github.com/KhronosGroup/Vulkan-Docs",
144
+ "restricted": false,
145
+ "risk": "clean"
146
+ }
147
+ }
README.md ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ task_categories:
4
+ - text-generation
5
+ language:
6
+ - en
7
+ - code
8
+ tags:
9
+ - kernel
10
+ - systems-programming
11
+ - computer-architecture
12
+ - algorithms
13
+ pretty_name: kernel-llm pool (part 1, knowledge slice)
14
+ ---
15
+
16
+ # kernel-llm pool — part 1: books, algorithms, mathematics, architecture
17
+
18
+ Training text for a kernel/machine-level C specialist. This is **part 1 of a
19
+ multi-part pool**, not the full 1T-token dataset: it is the knowledge slice
20
+ (design, architecture, algorithms, maths), built from repositories whose licences
21
+ were read rather than assumed.
22
+
23
+ Volume is stated as measured: **15.6M tokens** across 6735 rows, where a token is
24
+ estimated as bytes/3.6 because no tokenizer was run over this part. Byte counts are
25
+ exact; the token figure is an estimate and is labelled as one in `stats.json`.
26
+
27
+ ## Contents
28
+
29
+ | source | bucket | licence | rows | est. tokens | flag |
30
+ |---|---|---|---:|---:|---|
31
+ | `opentitan` | arch_code | Apache-2.0 | 4065 | 8034k | clean |
32
+ | `vulkan-spec` | books | CC-BY-4.0 | 726 | 3118k | clean |
33
+ | `aosa` | books | CC-BY-3.0 | 76 | 797k | clean |
34
+ | `rocket-chip` | arch_code | BSD-3-Clause OR Apache-2.0 | 308 | 592k | clean |
35
+ | `discrete-book` | math | CC-BY-NC-SA-4.0 | 132 | 577k | restricted |
36
+ | `cp-algorithms` | algorithms | CC-BY-SA-4.0 | 165 | 457k | clean |
37
+ | `miaow` | arch_code | BSD-3-Clause | 204 | 447k | clean |
38
+ | `opencl-spec` | books | CC-BY-4.0 | 106 | 422k | clean |
39
+ | `thealgorithms-c` | algorithms | GPL-3.0 | 398 | 275k | clean |
40
+ | `sdxpy` | books | CC-BY-NC-4.0 | 115 | 255k | restricted |
41
+ | `spike` | arch_code | BSD-3-Clause | 259 | 249k | clean |
42
+ | `vexriscv` | arch_code | MIT | 97 | 228k | clean |
43
+ | `ods` | books | CC-BY-2.5-CA | 19 | 135k | clean |
44
+ | `ods-code` | algorithms | CC-BY-2.5-CA | 65 | 61k | clean |
45
+ | **total** | | | **6735** | **15.6M** | |
46
+
47
+ Every row carries `source`, `repo_license`, `spdx`, `commit`, `n_bytes`, `n_tokens`
48
+ (`-1` when not measured), `restricted` and `path`, so a subset can be rebuilt exactly
49
+ and every row can be traced to the commit it came from.
50
+
51
+ ## Licence flags — read before training
52
+
53
+ This pool contains NonCommercial material. It is included and marked, but it is
54
+ **not** free for commercial use:
55
+
56
+ * `discrete-book` — CC-BY-NC-SA-4.0
57
+ * `sdxpy` — CC-BY-NC-4.0
58
+
59
+ Filter those rows out of any commercial training mix:
60
+
61
+ ```python
62
+ ds = ds.filter(lambda r: not r["restricted"])
63
+ ```
64
+
65
+ Publishing this data, or keeping it private, does not change the position: an NC
66
+ licence restricts the *use*, not only the redistribution, so training a model you
67
+ sell on NC text is a commercial use even if the text never leaves your disk.
68
+
69
+ Publisher-copyrighted books (Operating Systems: Three Easy Pieces, Computer
70
+ Architecture: A Quantitative Approach, Designing Data-Intensive Applications,
71
+ Systems Performance, Linux Kernel Development, Refactoring, Design Patterns) are
72
+ **not present at all** — no rows, no URLs. A book you can read online is not a
73
+ book you may train on.
74
+
75
+ ## What is not here
76
+
77
+ * kernel and driver trees (Linux, RTOS, GPU drivers) — part 2
78
+ * other kernels and compute kernels — part 3
79
+ * Stack v2 subsets — part 4 (gated)
80
+ * traces, commits, synthetic and replay data — part 5
81
+
82
+ ## Dedup and splits
83
+
84
+ `6735` distinct near-duplicate signatures; exact duplicates and MinHash near-duplicates
85
+ were dropped, with sources deduplicated in priority order so a trusted copy wins over
86
+ a mirror. `heldout` is 2% of groups, capped so no bucket is gutted.
87
+
88
+ **The held-out split is public.** It is a development split for measuring
89
+ contamination, not a secret holdout; encrypting public data does not create one.
90
+
91
+ ## How to load
92
+
93
+ ```python
94
+ from datasets import load_dataset
95
+ ds = load_dataset("ruthvikanne/kernel-pool-knowledge", split="train")
96
+ ```
97
+
98
+ `mix.json` and `mix-manifest.parquet` hold a *plan* (tier weights, repeat counts)
99
+ that joins on `path`; the text stays in the shards. `LICENSES.json` records, per
100
+ source, the declared licence, the evidence it was read from, and the exact commit.
data/heldout-00000.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:738db77c2fd5fbfd52399e75cd104ad53d9e7bb65cbff098a7ee52c3678f293e
3
+ size 83495
data/train-00000.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0b1d4c4af6c48c2d67c34c90a7d266e20bbb3e65ecf1392f62f98d84d5df5308
3
+ size 3442136
data/train-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:176ceaf20ec6823945c5f8eb0aa2ddcdb927b95a76178ef6813c9c33a91cce5c
3
+ size 3767848
data/train-00002.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:de4146fc460d3a7732147fd3a6bec66bf3381e53b7234d8c878f3f4604018021
3
+ size 5253426
data/train-00003.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ad6b1d377b88db38b0dcfe9071088b6de3d5a0493ee1f1c3d165ee35b2fe232d
3
+ size 1790213
mix-manifest.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fd12147a2b176323662e1dea5648fffb13c862a4489b6d98bd9a20ed413a8561
3
+ size 108390
mix.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "target_tokens": 45000000,
3
+ "pool_train_tokens_available": 14775329,
4
+ "planned_tokens": 35388726,
5
+ "coverage_of_target": 0.786,
6
+ "restricted_excluded": true,
7
+ "restricted_rows_dropped": 218,
8
+ "max_repeat": 3,
9
+ "tiers": {
10
+ "core": {
11
+ "weight": 0.9375,
12
+ "target_tokens": 42187500,
13
+ "available_tokens": 10306698,
14
+ "repeat": 3,
15
+ "achieved_tokens": 30920095,
16
+ "shortfall_tokens": 11267404,
17
+ "files": 5376
18
+ },
19
+ "design": {
20
+ "weight": 0.0625,
21
+ "target_tokens": 2812500,
22
+ "available_tokens": 4468630,
23
+ "repeat": 1.0,
24
+ "achieved_tokens": 4468630,
25
+ "shortfall_tokens": 0,
26
+ "files": 926
27
+ }
28
+ },
29
+ "tiers_unavailable": [
30
+ "systems",
31
+ "traces",
32
+ "math",
33
+ "synthetic",
34
+ "replay"
35
+ ],
36
+ "note": "Shortfall is the honest gap: up to max_repeat copies of the domain core is not enough to reach the target, so breadth/replay must come from sources not in this pool."
37
+ }
stats.json ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "config": {
3
+ "max_src_tok_M": 40.0,
4
+ "max_bucket_tok_M": 500.0,
5
+ "fresh_since": "2024-10-15",
6
+ "fresh_sources": "none",
7
+ "heldout_frac": 0.02,
8
+ "max_heldout_share": 0.2,
9
+ "near_dup_agree_of_32": 26,
10
+ "restrict_mode": "nc_copyleft",
11
+ "dedup_priority": [
12
+ [
13
+ "mcu",
14
+ 0
15
+ ],
16
+ [
17
+ "linux",
18
+ 1
19
+ ],
20
+ [
21
+ "kernels",
22
+ 2
23
+ ],
24
+ [
25
+ "arch_code",
26
+ 2
27
+ ],
28
+ [
29
+ "algorithms",
30
+ 3
31
+ ],
32
+ [
33
+ "books",
34
+ 3
35
+ ],
36
+ [
37
+ "docs",
38
+ 3
39
+ ],
40
+ [
41
+ "math",
42
+ 4
43
+ ]
44
+ ],
45
+ "tokenizer": "bytes/3.6 estimate"
46
+ },
47
+ "bytes_per_token_fallback": 3.6,
48
+ "heldout_groups": {
49
+ "arch_code": {
50
+ "groups": 14,
51
+ "held": 1,
52
+ "held_bytes": 138201,
53
+ "total_bytes": 38376749
54
+ },
55
+ "algorithms": {
56
+ "groups": 58,
57
+ "held": 1,
58
+ "held_bytes": 12409,
59
+ "total_bytes": 2858874
60
+ },
61
+ "books": {
62
+ "groups": 47,
63
+ "held": 1,
64
+ "held_bytes": 12346,
65
+ "total_bytes": 17077889
66
+ },
67
+ "math": {
68
+ "groups": 6,
69
+ "held": 1,
70
+ "held_bytes": 297782,
71
+ "total_bytes": 2301437
72
+ }
73
+ },
74
+ "near_dup": {
75
+ "n_sigs": 6735,
76
+ "near_dup_disabled_after": null
77
+ },
78
+ "by_bucket": {
79
+ "arch_code": {
80
+ "seen": 5690,
81
+ "kept_train": 4751,
82
+ "tok_train": 9515180,
83
+ "tok_estimated_train": 4751,
84
+ "near_dup": 199,
85
+ "exact_dup": 558,
86
+ "kept_heldout": 182,
87
+ "tok_heldout": 32867,
88
+ "tok_estimated_heldout": 182
89
+ },
90
+ "algorithms": {
91
+ "seen": 630,
92
+ "kept_train": 625,
93
+ "tok_train": 788947,
94
+ "tok_estimated_train": 625,
95
+ "kept_heldout": 3,
96
+ "tok_heldout": 3446,
97
+ "tok_estimated_heldout": 3,
98
+ "near_dup": 2
99
+ },
100
+ "books": {
101
+ "seen": 1055,
102
+ "kept_train": 1041,
103
+ "tok_train": 4723034,
104
+ "tok_estimated_train": 1041,
105
+ "near_dup": 13,
106
+ "kept_heldout": 1,
107
+ "tok_heldout": 3429,
108
+ "tok_estimated_heldout": 1
109
+ },
110
+ "math": {
111
+ "seen": 144,
112
+ "kept_train": 103,
113
+ "tok_train": 514275,
114
+ "tok_estimated_train": 103,
115
+ "kept_heldout": 29,
116
+ "tok_heldout": 63141,
117
+ "tok_estimated_heldout": 29,
118
+ "near_dup": 10,
119
+ "exact_dup": 2
120
+ }
121
+ }
122
+ }
upload-manifest.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "local": "C:\\Users\\ruthvikanne\\AppData\\Local\\Temp\\opencode\\pool1\\out",
3
+ "repo": "ruthvikanne/kernel-pool-knowledge",
4
+ "private": false,
5
+ "files": 12,
6
+ "bytes": 15678278,
7
+ "largest": [
8
+ [
9
+ "train-00002.parquet",
10
+ 5253426
11
+ ],
12
+ [
13
+ "train-00001.parquet",
14
+ 3767848
15
+ ],
16
+ [
17
+ "train-00000.parquet",
18
+ 3442136
19
+ ],
20
+ [
21
+ "train-00003.parquet",
22
+ 1790213
23
+ ],
24
+ [
25
+ "lsh_index.parquet",
26
+ 1220737
27
+ ]
28
+ ],
29
+ "include": null,
30
+ "exclude": "lsh_index.parquet"
31
+ }