Skip to content

Keep Random-LTD sequence lengths above the configured minimum - #8529

Open
vineethsaivs wants to merge 2 commits into
deepspeedai:masterfrom
vineethsaivs:fix/random-ltd-minimum-20260915
Open

vineethsaivs wants to merge 2 commits into
deepspeedai:masterfrom
vineethsaivs:fix/random-ltd-minimum-20260915

Conversation

@vineethsaivs

@vineethsaivs vineethsaivs commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Random-LTD rounds min_value=8 down to zero with seq_per_step=16, dropping every token from selected layers. Clamp to the first aligned length at or above the minimum.

Test: DS_ACCELERATOR=cpu PYTHONPATH=. python -m pytest tests/unit/runtime/test_data_efficiency.py -k random_ltd -q. Four CPU tests pass, including three DeepSpeedEngine SGD steps with actual RandomLayerTokenDrop wrappers and assertions on both selected layers' input lengths.

Apple M2 Pro CPU with one-rank Gloo exercises the 16-token retention boundary. The same test uses longer inputs on CUDA to exercise gather/scatter; that path was not run locally. Changed-file pre-commit passes.

Clamp to the first aligned sequence length at or above min_value, retaining the existing maximum bound.

Signed-off-by: Vineeth Sai <vineethsai4444@gmail.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ac0bde6cb0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/unit/runtime/test_data_efficiency.py Outdated
Signed-off-by: Vineeth Sai <vineethsai4444@gmail.com>
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