NVIDIA-NeMo / NVIDIA-NeMo/Curator
Domain Distribution Analysis + Automatic Rebalancin
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.8k
- Forks
- 327
- Avg merge
- 4d 5h
- Merged PRs (30d)
- 30
Description
What: Add a pipeline stage that (1) computes domain distribution across a dataset using an existing domain classifier, and (2) resamples documents to hit a target domain mix via upsampling/downsampling.
Why:
All carefully control domain ratios (code, math, science, web, books, etc.). Random sampling from a web crawl over-indexes low-value domains. Manual rebalancing is brittle; an automated stage that reads a target distribution config and resamples accordingly is essential for reproducing frontier training mixes.
Definition of Done:
- DomainRebalancingStage under nemo_curator/stages/text/
- Accepts a YAML/dict target domain distribution (e.g., {code: 0.15, math: 0.10, web: 0.60, ...})
- Reads domain label from document metadata (output of existing DomainClassifier or LLM Classifier model)
- Supports upsample-with-repetition and downsample-by-discard strategies
- Emits before/after distribution report
- Ray-native; operates on partitioned datasets without full shuffle
- End-to-end test: input skewed corpus → verify output matches target distribution within 1%?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in nemo_curator/stages/text/ and trace the existing DomainClassifier or LLM Classifier output to confirm the document metadata label. Define the target YAML/dict and partitioned Ray processing behavior, including repetition, discarding, and before/after reports. Done means an end-to-end test shows a skewed corpus reaches the requested domain mix within 1% without a full shuffle.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-engineering, machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100