QuickCoder-Dataset / dataset_guide /TARGET_400GB_POLICY.md
aisamdasu's picture
Mark 112534 Google Drive backup verified
1790b82 verified
|
Raw
History Blame Contribute Delete
4.27 kB

400GB Dataset Target Policy

Target

The final public dataset target is 400GB total, mirrored to both Hugging Face and Google Drive, packaged as twenty balanced 20GB-class checkpoints.

dataset/
  checkpoint_YYYYMMDD_HHMMSS_bundleNN_20g/
    dataset/
      checkpoint_YYYYMMDD_HHMMSS_bundleNN_20g.jsonl

Each checkpoint folder must contain exactly one dataset JSONL file. Tokenizer, Dense, MoE, generation notes, reports, and checksums live outside checkpoint folders.

Current Contract

  • Global duplicate policy: exact text duplicate count must be zero across the curated stream.
  • Bundle duplicate policy: in-bundle duplicate count must be zero.
  • Format: JSONL only.
  • Required field: non-empty text.
  • Preferred metadata: domain, difficulty, meta.lang, meta.source, repository/file context when available.

Quality Order

Use this order when deciding what enters the 400GB target:

  1. Real public code FIM from The Stack v2 family already staged in data/v2_shards.
  2. Verified high-quality Grok/Codex synthetic FIM and code completion records.
  3. Deduped synthetic code_gen records with useful executable or idiomatic code.
  4. Small public benchmark/instruction datasets only as a limited evaluation or style slice, not as bulk pretraining data.

Avoid adding public datasets only because they are large. Do not use gated or license-ambiguous sources as bulk input unless their access terms are explicitly accepted and recorded.

Target Mix

For a code completion/FIM model, prefer this approximate mix over the full 400GB:

Source class Target share Reason
Real public code FIM 60-70% Teaches real repository structure, APIs, style, imports
Synthetic FIM 20-30% Teaches clean middle reconstruction and tab-completion shape
High-quality code generation 10-15% Teaches continuation, algorithms, tests, and explanations
Bench/instruction slices <=5% Keeps reasoning formats visible without polluting pretraining

The mix should be enforced by streaming selection and dataloader weights, not by duplicating files on disk.

SSD-Safe Build Rule

Never materialize the whole 400GB dataset twice. The safe loop is:

  1. Keep source pools in hidden staging folders.
  2. Stream records through the disk-backed seen.db.
  3. Fill data/curated_upload only until there is enough for one 20GB bundle.
  4. Build one checkpoint by streaming selected parts into dataset/<checkpoint>/dataset/<checkpoint>.jsonl and deleting each source part after it is appended.
  5. Upload that checkpoint to Hugging Face.
  6. Upload that checkpoint to Google Drive with a low-RSS path such as rclone and verify remote size plus SHA256.
  7. Delete the local workspace checkpoint after HF and Google Drive remotes are both verified; delete duplicate Drive part files only after the single JSONL is present and at least one verified remote copy exists.

Google Drive Verification Rule

Google Drive Desktop local copy is not the same as cloud upload completion. Cloud completion is confirmed by either DriveFS metadata with no pending sync/error state or by a direct low-RSS Drive API path such as rclone returning a remote listing whose size and SHA256 match the local checkpoint manifest.

Google Drive Desktop is not allowed to exceed the RSS safety budget. If the Drive app grows above the upload-process safety threshold, stop it and use a lower-RSS upload path such as a dedicated CLI/API uploader before claiming cloud completion.

Public HF Candidate Policy

Current HF Hub candidates observed for code data include:

  • bigcode/the-stack-v2: high-priority real code, gated auto, license other.
  • bigcode/the-stack-v2-dedup: high-priority dedup variant, gated auto.
  • bigcode/starcoderdata: older high-volume code source, gated auto.
  • code-search-net/code_search_net: smaller, useful for docstring/function style and evaluation slices.
  • codeparrot/apps and deepmind/code_contests: useful for algorithmic problem-solving slices, not bulk repository pretraining.

Bulk additions from HF must pass license/access review, schema inspection, secret filtering, exact dedup, and small-sample quality inspection before they enter data/curated_upload.