| --- |
| pretty_name: Personal Codex Model Training Corpus |
| license: mit |
| language: |
| - code |
| annotations_creators: |
| - no-annotation |
| language_creators: |
| - found |
| source_datasets: |
| - original |
| size_categories: |
| - 10K<n<100K |
| task_categories: |
| - text-generation |
| task_ids: |
| - language-modeling |
| tags: |
| - code |
| - text |
| - source-code |
| - code-completion |
| - code-generation |
| - causal-language-modeling |
| - continued-pretraining |
| - fine-tuning |
| - coding-assistant |
| - software-engineering |
| - repository-level |
| - multilingual-code |
| - deduplicated |
| - provenance-aware |
| - parquet |
| - datasets |
| - typescript |
| - python |
| - javascript |
| configs: |
| - config_name: default |
| data_files: |
| - split: train |
| path: data/train-*.parquet |
| - split: valid |
| path: data/valid-*.parquet |
| dataset_info: |
| features: |
| - name: text |
| dtype: string |
| - name: repo |
| dtype: string |
| - name: path |
| dtype: string |
| - name: language |
| dtype: string |
| - name: sha |
| dtype: string |
| - name: chunk_index |
| dtype: int32 |
| - name: n_tokens |
| dtype: int32 |
| splits: |
| - name: train |
| num_examples: 15226 |
| num_bytes: 46393834 |
| - name: valid |
| num_examples: 3135 |
| num_bytes: 9543076 |
| --- |
| |
| # Personal Codex Model Training Corpus |
|
|
| ## Overview |
|
|
| Personal Codex Model Training Corpus is a provenance-aware, repository-level dataset for causal |
| language modeling, code completion, continued pretraining, and coding assistant adaptation. It is |
| built from source files present in local Git repository checkouts at a defined collection point. |
|
|
| The dataset prioritizes broad, authentic software-engineering coverage while retaining enough |
| metadata to audit every emitted chunk. It is not an instruction dataset, benchmark, or collection |
| of verified solutions. Each record represents source text as it existed in a repository checkout, |
| after filtering, chunking, secret screening, and global deduplication. |
|
|
| ## Dataset profile |
|
|
| | Metric | Value | |
| | --- | ---: | |
| | Total examples | 18,361 | |
| | Training examples | 15,226 | |
| | Validation examples | 3,135 | |
| | Emitted lines | 1,305,187 | |
| | Nonblank emitted lines | 1,153,093 | |
| | Approximate lexical tokens | 12,472,126 | |
| | UTF-8 source text | 50.5 MiB | |
| | Source files with retained chunks | 7,913 | |
| | Repositories with retained rows | 58 | |
|
|
| Line, byte, and token totals measure emitted training chunks. The configured chunk overlap can |
| repeat text at chunk boundaries. These figures describe training volume, not unique repository |
| lines of code or model-tokenizer counts. |
|
|
| ## Language and format distribution |
|
|
| The `language` value is assigned from a controlled extension and exact-filename mapping. Markdown, |
| configuration, schema, and build-system files are retained because they are part of real software |
| engineering workflows and frequently contain executable examples or machine-consumed structure. |
|
|
| | Language or format | Examples | Share | |
| | --- | ---: | ---: | |
| | Markdown | 6,559 | 35.7% | |
| | TypeScript | 6,170 | 33.6% | |
| | JSON | 2,828 | 15.4% | |
| | Python | 1,532 | 8.3% | |
| | XML Schema | 354 | 1.9% | |
| | JavaScript | 218 | 1.2% | |
| | CSS | 144 | 0.8% | |
| | YAML | 112 | 0.6% | |
| | MDX | 93 | 0.5% | |
| | SQL | 69 | 0.4% | |
| | Shell | 60 | 0.3% | |
| | HTML | 53 | 0.3% | |
| | Git Ignore | 44 | 0.2% | |
| | Text | 31 | 0.2% | |
| | Swift | 15 | 0.1% | |
| | TeX | 14 | 0.1% | |
| | Java | 13 | 0.1% | |
| | TOML | 9 | 0.0% | |
| | Dockerfile | 6 | 0.0% | |
| | Git Attributes | 4 | 0.0% | |
| | Web Manifest | 4 | 0.0% | |
| | Prettier Ignore | 4 | 0.0% | |
| | Prettier | 4 | 0.0% | |
| | Docker Ignore | 3 | 0.0% | |
| | XML | 3 | 0.0% | |
| | EditorConfig | 2 | 0.0% | |
| | INI | 2 | 0.0% | |
| | Handlebars | 2 | 0.0% | |
| | Batch | 2 | 0.0% | |
| | Procfile | 1 | 0.0% | |
| | JSON Lines | 1 | 0.0% | |
| | Runpod Ignore | 1 | 0.0% | |
| | Prisma | 1 | 0.0% | |
| | ESLint Ignore | 1 | 0.0% | |
| | Makefile | 1 | 0.0% | |
| | SCSS | 1 | 0.0% | |
|
|
| ## Intended uses |
|
|
| Appropriate uses include: |
|
|
| - continued pretraining or domain adaptation of causal language models |
| - code completion and repository-aware coding assistant experiments |
| - tokenizer, chunking, deduplication, and corpus composition research |
| - retrieval and provenance experiments using repository and path metadata |
| - controlled studies of personalization on repository-disjoint validation data |
|
|
| The dataset is not suitable as a correctness benchmark, a secure-code reference, a software |
| license classifier, or evidence of authorship and repository ownership. |
|
|
| ## Load the dataset |
|
|
| Install a compatible version of `datasets`, then load the full corpus: |
|
|
| ```python |
| from datasets import load_dataset |
| |
| dataset = load_dataset("JulianAT/personal-codex-model") |
| print(dataset) |
| print(dataset["train"].features) |
| ``` |
|
|
| Stream examples without downloading the complete dataset: |
|
|
| ```python |
| from datasets import load_dataset |
| |
| stream = load_dataset("JulianAT/personal-codex-model", split="train", streaming=True) |
| first_example = next(iter(stream)) |
| ``` |
|
|
| ## Schema |
|
|
| | Field | Type | Description | |
| | --- | --- | --- | |
| | `text` | string | Source-code or repository-text chunk used as the modeling target. | |
| | `repo` | string | Source repository name at collection time. | |
| | `path` | string | Repository-relative source path. | |
| | `language` | string | Language or format inferred from the configured mapping. | |
| | `sha` | string | SHA-256 digest of the emitted `text`. | |
| | `chunk_index` | int32 | Zero-based chunk position within the source file. | |
| | `n_tokens` | int32 | Tokenizer-independent lexical token estimate. | |
|
|
| ## Dataset construction |
|
|
| The builder applies the following deterministic pipeline: |
|
|
| 1. Discover configured Git repository checkouts. |
| 2. Walk supported source, documentation, schema, configuration, and build files. |
| 3. Exclude ignored, sensitive, generated, vendored, binary, oversized, and unsupported content. |
| 4. Decode retained files as UTF-8 and reject unreadable or empty payloads. |
| 5. Reject complete files containing high-confidence credential signatures. |
| 6. Chunk source text to approximately 896 lexical tokens with an overlap of |
| 64 lexical tokens. |
| 7. Remove exact duplicate chunks by SHA-256. |
| 8. Remove near-duplicate chunks with MinHash LSH. |
| 9. Assign repositories, rather than individual rows, to deterministic train and validation splits. |
|
|
| This repository-level split prevents a source repository from appearing in both splits. It reduces |
| direct leakage from repeated project structure and repository-specific conventions. |
|
|
| ## Deduplication and quality controls |
|
|
| Near-duplicate detection uses `datasketch.MinHashLSH` with |
| 128 permutations, token 5-grams, and a Jaccard |
| threshold of 0.85. The current build retained |
| 18,361 chunks after dropping |
| 1,470 exact duplicates and |
| 1,027 near duplicates. |
|
|
| The file walk excludes Git metadata, ignored paths, dependency and environment directories, build |
| outputs, vendored and generated directories, lockfiles, minified files, symlinks, binary or |
| non-UTF-8 payloads, files above 1,048,576 bytes, and unsupported formats. |
| Credential screening covers high-confidence private-key, platform-token, cloud-key, API-key, and |
| JWT patterns. |
|
|
| These controls reduce common leakage and duplication risks. They do not constitute a formal proof |
| that every row is safe, original, correct, or free of sensitive information. |
|
|
| ## Provenance, privacy, and licensing |
|
|
| Every record retains repository, path, language, chunk position, and content-hash metadata. This |
| supports traceability inside the published corpus without publishing local checkout locations or |
| builder credentials. |
|
|
| Some contributing repositories were private at collection time. Public publication was explicitly |
| enabled by the dataset maintainer. Users should still treat repository names, paths, comments, and |
| source text as potentially identifying information. |
|
|
| The packaged dataset is released under the MIT License. The included |
| `LICENSE` file contains the complete terms. This dataset-level license does not supersede separate |
| licenses, notices, or obligations that may apply to code from contributing repositories. Users are |
| responsible for source-specific compliance when redistributing code, releasing trained models, or |
| using generated output. |
|
|
| ## Limitations |
|
|
| - Source is collected from working-tree snapshots, not from deleted Git history. |
| - Repository contents can include incomplete, insecure, outdated, experimental, or generated-like |
| code that survives the configured filters. |
| - Extension-based language labels do not perform parser-level language verification. |
| - Lexical token estimates are not equivalent to tokens from a production model tokenizer. |
| - MinHash is approximate and can retain related text or remove independently written similar text. |
| - Chunk overlap increases emitted volume and can repeat boundary lines. |
| - The dataset contains no correctness, security, quality, preference, or authorship labels. |
| - Repository-disjoint validation measures transfer across included repositories, not general coding |
| ability across unrelated ecosystems. |
|
|
| ## Reproducibility and audit artifacts |
|
|
| `statistics.json` records build parameters, split assignments, row and token counts, language |
| distribution, filter decisions, and deduplication totals. `dataset_infos.json` records the feature |
| schema and split sizes. The Parquet shards are the canonical Hub loader source. |
|
|
| The Hub publication intentionally omits local Arrow and JSONL copies because they duplicate the |
| Parquet payload. It also omits source checkouts, local filesystem paths, author-email configuration, |
| and training artifacts. |
|
|
| ## Citation |
|
|
| ```bibtex |
| @misc{personal_codex_model_training_corpus, |
| author = {JulianAT}, |
| title = {Personal Codex Model Training Corpus}, |
| year = {2026}, |
| howpublished = {Hugging Face Datasets}, |
| url = {https://huggingface.co/datasets/JulianAT/personal-codex-model} |
| } |
| ``` |
|
|