aisamdasu commited on
Commit
fb0f153
·
verified ·
1 Parent(s): ccc53ec

Document single JSONL checkpoint policy

Browse files
dataset_guide/HF_DATASET_CARD.md CHANGED
@@ -20,7 +20,8 @@ size_categories:
20
  This dataset repository stores upload-ready JSONL training checkpoints for code
21
  completion and fill-in-the-middle training. Checkpoints are appended in
22
  approximately 20 GiB units so they can also be copied to Google Drive and loaded
23
- from Colab/H100 training jobs without requiring one huge monolithic archive.
 
24
 
25
  ## Current Upload Status
26
 
@@ -28,8 +29,8 @@ Only validation-passing checkpoints should be uploaded or used for training.
28
 
29
  | Checkpoint | Size | JSONL | In-bundle duplicates | Status |
30
  | --- | ---: | --- | ---: | --- |
31
- | `checkpoint_20260611_104104_bundle01_20g` | 19.04 GiB | valid | 0 | uploaded to Hugging Face |
32
- | `checkpoint_20260611_112534_bundle01_20g` | 19.11 GiB | valid | 0 | upload-ready |
33
 
34
  ## Repository Layout
35
 
@@ -42,7 +43,7 @@ moe/
42
  dataset/
43
  checkpoint_YYYYMMDD_HHMMSS_bundleNN_20g/
44
  dataset/
45
- *.jsonl
46
  dataset_guide/
47
  checkpoint_reports/
48
  checkpoint_YYYYMMDD_HHMMSS_bundleNN_20g/
@@ -91,7 +92,9 @@ A checkpoint is upload-ready only when:
91
  - JSONL parsing succeeds.
92
  - Empty `text` count is zero.
93
  - In-bundle duplicate count is zero.
94
- - The checkpoint folder contains only `dataset/*.jsonl`.
 
 
95
  - `MANIFEST.json`, `BALANCE_REPORT.md`, and `CHECKSUMS.txt` are present under
96
  `dataset_guide/checkpoint_reports/<checkpoint>/`.
97
  - Shared `tokenizer/`, `dense/`, and `moe/` documentation lives at repository
 
20
  This dataset repository stores upload-ready JSONL training checkpoints for code
21
  completion and fill-in-the-middle training. Checkpoints are appended in
22
  approximately 20 GiB units so they can also be copied to Google Drive and loaded
23
+ from Colab/H100 training jobs. New checkpoints use one JSONL file per 20 GiB
24
+ checkpoint.
25
 
26
  ## Current Upload Status
27
 
 
29
 
30
  | Checkpoint | Size | JSONL | In-bundle duplicates | Status |
31
  | --- | ---: | --- | ---: | --- |
32
+ | `checkpoint_20260611_104104_bundle01_20g` | 19.04 GiB | valid, legacy multi-part | 0 | uploaded to Hugging Face |
33
+ | `checkpoint_20260611_112534_bundle01_20g` | 19.11 GiB | valid, legacy multi-part | 0 | uploaded to Hugging Face; Google Drive local copy present |
34
 
35
  ## Repository Layout
36
 
 
43
  dataset/
44
  checkpoint_YYYYMMDD_HHMMSS_bundleNN_20g/
45
  dataset/
46
+ checkpoint_YYYYMMDD_HHMMSS_bundleNN_20g.jsonl
47
  dataset_guide/
48
  checkpoint_reports/
49
  checkpoint_YYYYMMDD_HHMMSS_bundleNN_20g/
 
92
  - JSONL parsing succeeds.
93
  - Empty `text` count is zero.
94
  - In-bundle duplicate count is zero.
95
+ - The checkpoint folder contains only one file:
96
+ `dataset/<checkpoint>.jsonl`. Legacy uploaded checkpoints may contain several
97
+ JSONL parts until they are repackaged.
98
  - `MANIFEST.json`, `BALANCE_REPORT.md`, and `CHECKSUMS.txt` are present under
99
  `dataset_guide/checkpoint_reports/<checkpoint>/`.
100
  - Shared `tokenizer/`, `dense/`, and `moe/` documentation lives at repository
dataset_guide/README.md CHANGED
@@ -14,7 +14,9 @@ that can be uploaded to Google Drive, Hugging Face, or mounted in Colab.
14
  Generation must be streaming and out-of-core:
15
 
16
  - Never load a whole corpus or checkpoint into RAM.
17
- - Write JSONL shards incrementally.
 
 
18
  - Use a disk-backed dedup index.
19
  - Keep source files immutable.
20
  - Stop generation when disk free space approaches the safety floor.
@@ -22,8 +24,8 @@ Generation must be streaming and out-of-core:
22
  ## Checkpoint Unit
23
 
24
  Each checkpoint targets about 20 GiB because that size is practical for Google
25
- Drive uploads and Colab/H100 training runs. A checkpoint owns its local JSONL
26
- files; files are moved into the checkpoint folder rather than copied.
27
 
28
  Checkpoint folders are intentionally dataset-only:
29
 
@@ -31,12 +33,15 @@ Checkpoint folders are intentionally dataset-only:
31
  dataset/
32
  checkpoint_YYYYMMDD_HHMMSS_bundleNN_20g/
33
  dataset/
34
- *.jsonl
35
  ```
36
 
37
  Reports and checksums live outside checkpoint folders at
38
  `dataset_guide/checkpoint_reports/<checkpoint>/`.
39
 
 
 
 
40
  ## Required Validation
41
 
42
  Before a checkpoint is considered upload-ready:
@@ -50,6 +55,6 @@ Before a checkpoint is considered upload-ready:
50
 
51
  ## Training Loader Expectations
52
 
53
- Training loaders should read `dataset/*.jsonl` line by line. They should append
54
- EOS between records, preserve FIM tokens, and avoid multi-worker duplication by
55
- sharding files or line ranges across workers.
 
14
  Generation must be streaming and out-of-core:
15
 
16
  - Never load a whole corpus or checkpoint into RAM.
17
+ - Write staging JSONL parts incrementally.
18
+ - Merge selected staging parts into one checkpoint JSONL by streaming bytes, then
19
+ delete each staging part.
20
  - Use a disk-backed dedup index.
21
  - Keep source files immutable.
22
  - Stop generation when disk free space approaches the safety floor.
 
24
  ## Checkpoint Unit
25
 
26
  Each checkpoint targets about 20 GiB because that size is practical for Google
27
+ Drive uploads and Colab/H100 training runs. The preferred checkpoint shape is
28
+ one complete JSONL file per checkpoint.
29
 
30
  Checkpoint folders are intentionally dataset-only:
31
 
 
33
  dataset/
34
  checkpoint_YYYYMMDD_HHMMSS_bundleNN_20g/
35
  dataset/
36
+ checkpoint_YYYYMMDD_HHMMSS_bundleNN_20g.jsonl
37
  ```
38
 
39
  Reports and checksums live outside checkpoint folders at
40
  `dataset_guide/checkpoint_reports/<checkpoint>/`.
41
 
42
+ Older legacy checkpoints may contain multiple 1 GiB JSONL parts. New
43
+ checkpoints should use the single-file layout above.
44
+
45
  ## Required Validation
46
 
47
  Before a checkpoint is considered upload-ready:
 
55
 
56
  ## Training Loader Expectations
57
 
58
+ Training loaders should read the checkpoint JSONL line by line. They should
59
+ append EOS between records, preserve FIM tokens, and avoid multi-worker
60
+ duplication by sharding line ranges across workers.
dataset_guide/TARGET_200GB_POLICY.md ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 200GB Dataset Target Policy
2
+
3
+ ## Target
4
+
5
+ The final public dataset target is 200GB total, packaged as ten balanced
6
+ 20GB-class checkpoints.
7
+
8
+ ```text
9
+ dataset/
10
+ checkpoint_YYYYMMDD_HHMMSS_bundleNN_20g/
11
+ dataset/
12
+ checkpoint_YYYYMMDD_HHMMSS_bundleNN_20g.jsonl
13
+ ```
14
+
15
+ Each checkpoint folder must contain exactly one dataset JSONL file. Tokenizer,
16
+ Dense, MoE, generation notes, reports, and checksums live outside checkpoint
17
+ folders.
18
+
19
+ ## Current Contract
20
+
21
+ - Global duplicate policy: exact `text` duplicate count must be zero across the
22
+ curated stream.
23
+ - Bundle duplicate policy: in-bundle duplicate count must be zero.
24
+ - Format: JSONL only.
25
+ - Required field: non-empty `text`.
26
+ - Preferred metadata: `domain`, `difficulty`, `meta.lang`, `meta.source`,
27
+ repository/file context when available.
28
+
29
+ ## Quality Order
30
+
31
+ Use this order when deciding what enters the 200GB target:
32
+
33
+ 1. Real public code FIM from The Stack v2 family already staged in
34
+ `data/v2_shards`.
35
+ 2. Verified high-quality Grok/Codex synthetic FIM and code completion records.
36
+ 3. Deduped synthetic `code_gen` records with useful executable or idiomatic code.
37
+ 4. Small public benchmark/instruction datasets only as a limited evaluation or
38
+ style slice, not as bulk pretraining data.
39
+
40
+ Avoid adding public datasets only because they are large. Do not use gated or
41
+ license-ambiguous sources as bulk input unless their access terms are explicitly
42
+ accepted and recorded.
43
+
44
+ ## Target Mix
45
+
46
+ For a code completion/FIM model, prefer this approximate mix over the full
47
+ 200GB:
48
+
49
+ | Source class | Target share | Reason |
50
+ |---|---:|---|
51
+ | Real public code FIM | 60-70% | Teaches real repository structure, APIs, style, imports |
52
+ | Synthetic FIM | 20-30% | Teaches clean middle reconstruction and tab-completion shape |
53
+ | High-quality code generation | 10-15% | Teaches continuation, algorithms, tests, and explanations |
54
+ | Bench/instruction slices | <=5% | Keeps reasoning formats visible without polluting pretraining |
55
+
56
+ The mix should be enforced by streaming selection and dataloader weights, not
57
+ by duplicating files on disk.
58
+
59
+ ## SSD-Safe Build Rule
60
+
61
+ Never materialize the whole 200GB dataset twice. The safe loop is:
62
+
63
+ 1. Keep source pools in hidden staging folders.
64
+ 2. Stream records through the disk-backed `seen.db`.
65
+ 3. Fill `data/curated_upload` only until there is enough for one 20GB bundle.
66
+ 4. Build one checkpoint by streaming selected parts into
67
+ `dataset/<checkpoint>/dataset/<checkpoint>.jsonl` and deleting each source
68
+ part after it is appended.
69
+ 5. Upload that checkpoint to Hugging Face.
70
+ 6. Copy that checkpoint to Google Drive Desktop and wait for Drive sync.
71
+ 7. Delete the local workspace checkpoint after HF is verified and Drive has a
72
+ local copy; delete the Drive local copy only after cloud sync is verified.
73
+
74
+ ## Google Drive Verification Rule
75
+
76
+ Google Drive Desktop local copy is not the same as cloud upload completion.
77
+ Cloud completion is confirmed only when DriveFS metadata no longer shows local
78
+ placeholder IDs for the JSONL files and the Drive app has no pending sync/error
79
+ state for the checkpoint.
80
+
81
+ ## Public HF Candidate Policy
82
+
83
+ Current HF Hub candidates observed for code data include:
84
+
85
+ - `bigcode/the-stack-v2`: high-priority real code, gated auto, license `other`.
86
+ - `bigcode/the-stack-v2-dedup`: high-priority dedup variant, gated auto.
87
+ - `bigcode/starcoderdata`: older high-volume code source, gated auto.
88
+ - `code-search-net/code_search_net`: smaller, useful for docstring/function
89
+ style and evaluation slices.
90
+ - `codeparrot/apps` and `deepmind/code_contests`: useful for algorithmic
91
+ problem-solving slices, not bulk repository pretraining.
92
+
93
+ Bulk additions from HF must pass license/access review, schema inspection,
94
+ secret filtering, exact dedup, and small-sample quality inspection before they
95
+ enter `data/curated_upload`.