Add normalization and tokenization for starcoder2-extras#4626
Merged
ravwojdyla merged 6 commits intomainfrom Apr 10, 2026
Merged
Add normalization and tokenization for starcoder2-extras#4626ravwojdyla merged 6 commits intomainfrom
ravwojdyla merged 6 commits intomainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ccbcd762a0
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Adds download/reshard helpers for the bigcode/starcoder2data-extras subsets (ir_cpp, ir_python, ir_rust, ir_low_resource, documentation, kaggle) and an experiment script that tokenizes each subset with the marin tokenizer. ir_low_resource is resharded to even out its parquet files and given 80g worker RAM.
…starcoder2-extras - Add normalize step between download and tokenize for starcoder2-extras, replacing the reshard step with the standard normalize pipeline - Add max_record_size param to normalize to split oversized documents (documentation subset has records up to 64MB e.g. full OpenJDK docs) - Add file_extensions filter to normalize's file discovery to skip non-data files like provenance.json - Expose levanter_batch_size through the full write pipeline (writers → plan → Dataset → TokenizeConfig → default_tokenize) to control memory usage for large-document datasets - Remove reshard_starcoder2_extras_step (superseded by normalize) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove the record-splitting feature (max_record_size) from normalize — reverting _make_normalize_fn back to a simple map, removing the parameter from _build_pipeline, normalize_to_parquet, normalize_step, and the starcoder2_extras experiment. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…entation to 32GB Add resources and worker_resources parameters to default_tokenize so callers can override the Fray container and Zephyr worker memory limits. Documentation subset gets 32GB for both — it contains a single 64MB OpenJDK record that peaks at ~9GB RSS during tokenization. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Reject batch_size < 1 in write_levanter_cache to prevent silent data loss (batch_size=0 would drop all records after the exemplar). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
d0f5887 to
daf2a49
Compare
ravwojdyla
added a commit
that referenced
this pull request
Apr 18, 2026
Extend the convention established by common_corpus and starcoder2-extras (#4626): expose a normalize_<dataset>_step factory in each datakit download module and wire experiments through download -> normalize -> tokenize. Since normalize now processes a single directory (#4886), datasets with multiple sub-datasets (nemotron v1/v2) get one normalize step per split: - nsf_awards: one step, id_field="awd_id", file_extensions=(".parquet",) - nemotron_v1: one step per quality/kind split (7 splits defined in NEMOTRON_V1_SPLITS), file_extensions=(".jsonl.gz",) - nemotron_v2: one step per (family, subset) pair, file_extensions=(".parquet",) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ravwojdyla
added a commit
that referenced
this pull request
Apr 19, 2026
Extend the convention established by common_corpus and starcoder2-extras (#4626): expose a normalize_<dataset>_step factory in each datakit download module and wire experiments through download -> normalize -> tokenize. Since normalize now processes a single directory (#4886), datasets with multiple sub-datasets (nemotron v1/v2) get one normalize step per split: - nsf_awards: one step, id_field="awd_id", file_extensions=(".parquet",) - nemotron_v1: one step per quality/kind split (7 splits defined in NEMOTRON_V1_SPLITS), file_extensions=(".jsonl.gz",) - nemotron_v2: one step per (family, subset) pair, file_extensions=(".parquet",) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ravwojdyla
added a commit
that referenced
this pull request
Apr 20, 2026
Extend the convention established by common_corpus and starcoder2-extras (#4626): expose a normalize_<dataset>_step factory in each datakit download module and wire experiments through download -> normalize -> tokenize. Since normalize now processes a single directory (#4886), datasets with multiple sub-datasets (nemotron v1/v2) get one normalize step per split: - nsf_awards: one step, id_field="awd_id", file_extensions=(".parquet",) - nemotron_v1: one step per quality/kind split (7 splits defined in NEMOTRON_V1_SPLITS), file_extensions=(".jsonl.gz",) - nemotron_v2: one step per (family, subset) pair, file_extensions=(".parquet",) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ravwojdyla
added a commit
that referenced
this pull request
Apr 20, 2026
Extend the convention established by common_corpus and starcoder2-extras (#4626): expose a normalize_<dataset>_step factory in each datakit download module and wire experiments through download -> normalize -> tokenize. Since normalize now processes a single directory (#4886), datasets with multiple sub-datasets (nemotron v1/v2) get one normalize step per split: - nsf_awards: one step, id_field="awd_id", file_extensions=(".parquet",) - nemotron_v1: one step per quality/kind split (7 splits defined in NEMOTRON_V1_SPLITS), file_extensions=(".jsonl.gz",) - nemotron_v2: one step per (family, subset) pair, file_extensions=(".parquet",) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ravwojdyla
added a commit
that referenced
this pull request
Apr 20, 2026
Extend the convention established by common_corpus and starcoder2-extras (#4626): expose a normalize_<dataset>_step factory in each datakit download module and wire experiments through download -> normalize -> tokenize. Since normalize now processes a single directory (#4886), datasets with multiple sub-datasets (nemotron v1/v2) get one normalize step per split: - nsf_awards: one step, id_field="awd_id", file_extensions=(".parquet",) - nemotron_v1: one step per quality/kind split (7 splits defined in NEMOTRON_V1_SPLITS), file_extensions=(".jsonl.gz",) - nemotron_v2: one step per (family, subset) pair, file_extensions=(".parquet",) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ravwojdyla
added a commit
that referenced
this pull request
Apr 20, 2026
* add `normalize_<dataset>_step` factories for `nsf_awards`, `nemotron_v1`, `nemotron_v2` — extends the convention from #4626 * since normalize now processes a single directory (#4886), multi-split datasets get one normalize step per split * `nsf_awards`: one step, `id_field="awd_id"`, `.parquet` * `nemotron_v1`: one step per `quality`/`kind` split (7 in `NEMOTRON_V1_SPLITS`), `.jsonl.zst` [^1] * `nemotron_v2`: one step per `(family, subset)`, `.parquet` * wire `nsf_awards` and `nemotron_v2` experiments through download → normalize → tokenize * `nemotron_v1` experiment wiring deferred — existing hardcoded-path tokenize stays until the full normalize + dedup + consolidate chain is validated * validated `nemotron_v1` normalize end-to-end on `quality=medium-low/kind=actual` (1.24B records, 6299 shards, peak 14.47 GB on 16 GB workers); `nsf_awards` normalize completed (42 parquet files) [^1]: downloader writes `.jsonl.zst` (rewrites `jsonl.zstd` → `jsonl.zst` on write) Co-authored-by: Rafal Wojdyla <ravwojdyla@gmail.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
file_extensionsfilter to normalize's file discovery to skip non-data files (e.g.provenance.json)levanter_batch_sizethrough the full write pipeline (writers → plan → Dataset → TokenizeConfig → default_tokenize) to control memory for large-document datasetsresourcesandworker_resourcesondefault_tokenizefor per-subset memory tuningreshard_starcoder2_extras_step(superseded by normalize)Test plan
levanter_batch_size=128prevents OOM on large-document shards🤖 Generated with Claude Code