Skip to content

fix(tokenizer): prevent empty-symbol hangs with hosted regression coverage - #3855

Merged
LauraGPT merged 2 commits into
mainfrom
codex/pr3852-hosted-regressions-20261107
Nov 7, 2026
Merged

LauraGPT merged 2 commits into
mainfrom
codex/pr3852-hosted-regressions-20261107

Conversation

@LauraGPT

@LauraGPT LauraGPT commented Nov 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Integrates #3852 while preserving its original commit and authorship. Adds only missing NumPy workflow paths and the submitted regression file to hosted CI. The original PR triggered no workflows; this companion makes the regression enforceable before normal merge.

Empty non-linguistic symbols from a blank line or iterable no longer trap CharTokenizer/PhonemeTokenizer in a non-consuming loop. Nonempty symbol behavior is retained.

Maintainer validation

  • All 3 submitted regressions fail on unchanged main. Candidate plus adjacent tokenizer tests: 28 pass.
  • Real NVIDIA L20Z CTC forward/backward with actual tokenizers: 24 analytic cases across file/list/generator, keep/remove, FP32/BF16-autocast. 12 character cases were retained from the first run; after correcting the harness's mistaken empty-phoneme expectation, only 12 unfinished phoneme cases ran. That first failed harness receipt is retained. No product thresholds changed.
  • Private HOME/cache and kernel-level network isolation. No pretrained weights, downloads, recognition-quality benchmark or full-suite claim.
  • Workflow structure check confirms only 3 paths per trigger and 1 regression command were added; read-only permissions and existing checks are unchanged. Exact new-head hosted CI remains required before merge.

This is not a new release. Nano and production services are unchanged.

MohammadHijjawi97 and others added 2 commits November 7, 2026 14:17
CharTokenizer and PhonemeTokenizer load non_linguistic_symbols with
line.rstrip(), so a blank line in the symbol file (or an "" entry in a
list) adds the empty string to the set. line.startswith("") is true at
every position without consuming any input, so text2tokens never
terminates (and keeps appending "" tokens when symbols are kept).

Drop the empty string after the symbols are loaded and add a regression
test covering a file with a blank line and an iterable with "".
Preserve the original PR #3852 commit and add only missing trigger paths and regression selection.

Signed-off-by: LauraGPT <zhifu.gzf@alibaba-inc.com>
@LauraGPT
LauraGPT merged commit d216ab8 into main Nov 7, 2026
2 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.

2 participants