Skip to content

Fix fixed-size drop-last sampling and Korean text cleaning - #3995

Merged
LauraGPT merged 2 commits into
mainfrom
codex/training-input-sampler-korean-cleaner
Dec 1, 2026
Merged

LauraGPT merged 2 commits into
mainfrom
codex/training-input-sampler-korean-cleaner

Conversation

@LauraGPT

@LauraGPT LauraGPT commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

This integrates @sohailshk’s #3913 and #3915 on current main. The first commit preserves the four contributed implementation/test blobs and combines their overlapping entries in NumPy CI. The follow-up fixes a distributed boundary found when testing that integration.

  • Fixed-size example samplers truncate incomplete global batches when drop_last=True. With a length limit, they now filter the global index pool before truncation/padding and rank selection. Each rank computes eligibility from dataset length metadata once per epoch when filtering is enabled. With no length limit the extra metadata scan is not performed. This does not change the dynamic token-batching policy.
  • The tokenizer imports the existing Korean normalizer. The real tokenize_text --cleaner korean_cleaner CLI now spells out Latin letters and digits, with no new dependency.

Before the follow-up, two real CPU/Gloo ranks given eight alternating short/long examples both reported two batches, but yielded two and zero. Afterward they each report and yield one batch: [0, 4] and [2, 6]. The three new regression tests failed before and passed afterward. The combined tree passed 24 related CPU tests; 128 two-rank non-filtered cases matched the original integration outputs exactly. The two fixed-size samplers also consumed synthetic batches with real CUDA SGD on one idle L20Z (four unfiltered and two filtered cases). These tests do not run an ASR model or measure throughput.

LauraGPT and others added 2 commits December 1, 2026 23:04
Integrate the implementation and regression tests from #3913 and #3915. Both contributions add entries at the same places in NumPy CI; retain both for pull requests and main.

Co-authored-by: sohailshk <122166523+sohailshk@users.noreply.github.com>
Signed-off-by: LauraGPT <zhifu.gzf@alibaba-inc.com>
Use the eligible example pool for per-rank lengths and for truncation or padding. Refresh its metadata on a new epoch. Cover uneven eligibility across ranks, empty pools and epoch changes.

Signed-off-by: LauraGPT <zhifu.gzf@alibaba-inc.com>
@LauraGPT
LauraGPT merged commit 5dd24ed into main Dec 1, 2026
3 checks passed
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