--- pretty_name: Locus Repository Code Pool language: - code license: other task_categories: - text-generation size_categories: - 1M", "parents": [""], "provenance": { "dataset": "HuggingFaceCode/stack-v3-train", "revision": "", "repository_name": "owner/repository", "commit_id": "", "content_sha256": "", "shape": "repository" }, "meta": { "file_count": 12, "file_order": ["README.md", "src/main.py"], "programming_languages": ["markdown", "python"], "has_tests": true, "repository_health_band": "B" }, "annotations": { "programming_languages": ["markdown", "python"], "has_tests": true, "repository_health_band": "B" }, "payload": "<|repo_start|>owner/repository@commit\n<|file_start|>README.md\n..." } ``` `payload` is the model-facing text. It uses explicit repository and file boundaries: `<|repo_start|>`, `<|repo_end|>`, `<|file_start|>`, and `<|file_end|>`. ## Loading the JSONL For a private checkout, authenticate with Hugging Face first, then load the shards as JSON: ```python from datasets import load_dataset dataset = load_dataset( "json", data_files="hf://datasets/ahnaftaz/locus-repo-code-pool-v2/**/*.jsonl", split="train", ) print(dataset[0]["payload"]) ``` Before training, collapse exact repeated rows by stable `id` and canonical row hash, fail closed on any same-ID/different-content pair, tokenize the selected payloads exactly, and freeze the selected IDs and weights in a corpus manifest. For causal-language-model training, preserve repository/file boundaries while packing. Long rows should be split deterministically at file boundaries where possible, with the repository header and parent document ID retained for each window. The four literal boundary strings may be kept as normal tokenizer input or registered as reserved tokens; whichever choice you make should be versioned with the training manifest. Fill-in-the-middle and repository-context objectives are reasonable experiments, but they are not baked into the stored dataset. ## Intended uses - pretraining and continued pretraining for code models; - repository-aware completion and retrieval experiments; - language, file-purpose, quality, and repository-context mixture studies; and - data-quality research using the structured provenance and health fields. ## Limitations and responsibility - The data represents repository snapshots, not Git histories, commits, pull requests, issue discussions, or execution traces. - Marker-based holdout filtering reduces known overlap but does not prove full benchmark decontamination. - Some early rows contain less detailed lineage metadata than the latest recipe; treat missing evidence as unknown, not false or zero. - Stack v3 redacts PII upstream, which can occasionally damage source text. - Health bands are heuristics and should not be treated as correctness labels. - Source code remains governed by its original repository/file licenses and attribution requirements. Stack v3's dataset terms do not replace them. - Do not train directly on the physical row count: the pool contains exact cross-lane repeats that must be removed or intentionally weighted. ## Acknowledgements The source corpus is The Stack v3 by the BigCode/Hugging Face community. Locus adds deterministic repository assembly, conservative filtering, structured evidence, durable upload verification, and global reconciliation.