NVIDIA-NeMo / NVIDIA-NeMo/Curator
Perplexity Filter (KenLM)
Open
@abdr17 is already working on this.
Since Jul 16, 2026.
enhancement
- Dominant language
- Python
- Stars
- 1.8k
- Forks
- 327
- Avg merge
- 4d 5h
- Merged PRs (30d)
- 30
Description
What: Add a document-level perplexity filter using KenLM n-gram language models, with configurable min/max perplexity thresholds and per-language model support.
Why: KenLM perplexity is one of the three canonical LLM pretraining quality signals alongside Gopher and C4 rules. It is used in C4, Dolma, RefinedWeb, and most production pipelines.
Definition of Done:
- PerplexityFilter stage accepts a KenLM binary model path, min_perplexity, max_perplexity
- Pre-trained KenLM models for English (and optionally other languages) documented and linked
- Perplexity score written to document metadata for inspection
- Integrated into the standard text curation tutorial pipeline
- Benchmarked throughput (docs/sec) on a reference GPU instance
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.
Assessment
This issue has not been assessed yet.