Skip to content

[codex] Document memory-efficient semantic dedup fitting#2149

Open
lbliii wants to merge 1 commit into
NVIDIA-NeMo:mainfrom
lbliii:codex/docs-late-freeze-updates
Open

[codex] Document memory-efficient semantic dedup fitting#2149
lbliii wants to merge 1 commit into
NVIDIA-NeMo:mainfrom
lbliii:codex/docs-late-freeze-updates

Conversation

@lbliii

@lbliii lbliii commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Addresses the semantic-deduplication portion of #2144. The bundled 26.06 release-note disposition is tracked in existing PR #2143.

Summary

  • documents KMeansStage.fit_data_fraction, SemanticDeduplicationWorkflow.fit_data_fraction, and TextSemanticDeduplicationWorkflow.kmeans_fit_data_fraction
  • explains per-actor file sampling, validation, the two-pass execution path, peak-memory reduction, and added I/O
  • documents direct KMeansStage.cache_path centroid persistence and its distinction from workflow cache paths
  • corrects the output artifact tree: workflow wrappers do not save kmeans_centroids.npy

Validation

  • fern check: 0 errors, 103 pre-existing warnings
  • all 11 Python examples parse with ast
  • source contract audit confirms all documented parameter names exist on current main
  • link check baseline remains the 22 pre-existing errors outside this page

Signed-off-by: Lawrence Lane <llane@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@lbliii lbliii self-assigned this Jul 1, 2026
@lbliii lbliii marked this pull request as ready for review July 1, 2026 21:00
@lbliii lbliii requested a review from a team as a code owner July 1, 2026 21:00
@lbliii lbliii requested review from suiyoubi and removed request for a team July 1, 2026 21:00
@greptile-apps

greptile-apps Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds documentation for the memory-efficient K-means fitting path in semantic deduplication, covering the new kmeans_fit_data_fraction / fit_data_fraction parameters across all three API layers (TextSemanticDeduplicationWorkflow, SemanticDeduplicationWorkflow, and KMeansStage).

  • Adds a "Reduce K-means fitting memory" section with accurate two-pass mechanics, validated against the source implementation in kmeans.py.
  • Corrects the output artifact tree: removes kmeans_centroids.npy from the workflow cache path and documents that only a direct KMeansStage(cache_path=…) call persists centroids.

Confidence Score: 5/5

Pure documentation change; no executable code paths are modified, and all documented behaviour was verified against the current source.

Every parameter name (kmeans_fit_data_fraction, fit_data_fraction), default value (None), sampling formula (round(fraction × N_files), minimum 1), memory characterisation, and centroid-persistence caveat (KMeansStage.cache_path vs workflow cache_path=None) was cross-checked against kmeans.py, workflow.py, and semantic.py and found to be correct. The directory tree correction (removing kmeans_centroids.npy from the workflow path) also matches the source. No logic regressions are possible from a docs-only diff.

No files require special attention.

Important Files Changed

Filename Overview
fern/versions/main/pages/curate-text/process-data/deduplication/semdedup.mdx Documentation-only change adding accurate descriptions of fit_data_fraction/kmeans_fit_data_fraction; all parameter names, sampling logic, memory semantics, and centroid-persistence behaviour verified against source.

Reviews (1): Last reviewed commit: "docs: explain memory-efficient semantic ..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant