NVIDIA-NeMo / NVIDIA-NeMo/Curator

Line-Level Quality Filtering

Open
#1,718 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
1.8k
Forks
328
Avg merge
4d 5h
Merged PRs (30d)
30

Description

What:
Add a stage that filters or removes individual low-quality lines within documents — rather than discarding entire documents — then enforces a word-removal ratio threshold (discard doc if too many lines were stripped). Targets boilerplate lines, nav menus, cookie notices, tracking scripts, and spam lines that survive document-level filters.

Why:
FLUX (March 2026) introduces a 4-stage pipeline where line-level cleaning is the critical step that enables simultaneously achieving higher quality and higher token retention vs. prior approaches. Surgical line removal outperforms whole-document rejection because most boilerplate-heavy documents still contain valuable content.

Definition of Done:

  • LineLevelQualityFilter stage under nemo_curator/stages/text/filters/
  • Configurable per-line removal rules: min line length, max repetition ratio, URL-only lines, nav/menu pattern regex, boilerplate string matching
  • Word removal ratio enforcement: if removed_tokens / total_tokens > threshold (default: 0.3), discard document
  • Reports per-rule removal statistics across dataset
  • Composable with existing document-level filters (runs after, not instead of)
  • Ray-native; operates line-by-line on partitioned datasets without full materialization
  • Performance test
  • End-to-end test: verify known boilerplate-heavy documents are cleaned, not discarded

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing stages under nemo_curator/stages/text/filters/ and determine how Ray-native, partitioned processing is structured. Implement the LineLevelQualityFilter requirements, including configurable removal rules, the 0.3 word-removal threshold, and per-rule statistics. Done means performance and end-to-end tests show boilerplate lines are removed while valuable documents are retained.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-engineering, testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.