Skip to content

docs(skills): repair sequence-packing guidance and refresh signature - #4636

Merged
cuichenx merged 9 commits into
mainfrom
automation/nvskills-signature-refresh-20260702
Jul 6, 2026
Merged

cuichenx merged 9 commits into
mainfrom
automation/nvskills-signature-refresh-20260702

Conversation

@cuichenx

@cuichenx cuichenx commented Jul 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Repair the sequence-packing skill after recent packing refactors, update it against current main, and refresh its generated NVSkills evaluation, publication card, and OMS signature in the same PR.

The branch includes signed merge commits through 760be8f0, which incorporate main@572a8e9d without rewriting or overriding Yu Yao's changes.

The remediation, content, and main-sync commits after the original PR head were produced by Codex under user direction. Treat them as AI-authored changes requiring normal review; GPG signatures and DCO signoff establish commit identity/compliance, not human authorship.

Agent-authored skill changes

  • Replace stale embedded source ranges with anchors at the current SFT configuration, config validation, collate-time packing, and GPT THD metadata paths.
  • Clarify that offline pad_seq_to_mult is configured explicitly, while ConfigContainer computes the CP/SP LCM automatically only for in-batch packing.
  • Point VLM in-batch packing guidance at the collate-time implementation in data/sequence_batching.py while retaining the vlm_step.py consumer evidence.
  • Point long-context and model opt-out evidence at the actual recipes/*/h100/ implementation modules introduced by the recipe namespace refactor.
  • Document Yu Yao's mapped-padding loss-mask guarantee from fix(data): preserve loss masking for mapped padding #4675 and add its SFT and packed-parquet implementation/tests to the skill evidence and verification commands.
  • Replace brittle historical pass counts with focused verification commands that cover config mutual exclusion, direct collate-time packing, VLM metadata consumption, and mapped padding.
  • Correct the packed-plus-CP functional-test evidence path and update the validation card date and direct unit-test evidence.

No Megatron Bridge product/runtime source code is modified by this PR's agent-authored content commits; current main is merged verbatim, and the substantive changes are limited to skill instructions and metadata.

Generated NVSkills artifacts

NVSkills CI owns regeneration of:

  • BENCHMARK.md
  • skill-card.md
  • skill.oms.sig

The generated commit must be based on the latest non-NVSkills source/content commit before merge.

Validation

  • 15 passed: tests/unit_tests/training/utils/test_packed_seq_utils.py
  • 17 passed: focused packing/config/CP validation selection in tests/unit_tests/training/test_config.py
  • 9 passed: tests/unit_tests/data/vlm_datasets/test_batching.py
  • 2 passed: focused deferred-packing/packed-metadata selection in tests/unit_tests/training/test_vlm_step.py
  • 2 passed: negative and mapped-negative loss-mask cases in tests/unit_tests/data/datasets/test_packed_parquet.py
  • 2 passed: mapped-padding loss-mask cases for SFT and packed SFT in tests/unit_tests/data/datasets/test_sft.py
  • Every card.yaml evidence path exists in the merged tree, and all embedded source ranges match current line locations.
  • uv run --no-project pre-commit run --all-files in the NeMo 26.06 container
  • Full pre-commit was rerun after the final main@572a8e9d merge.
  • User-authorized, agent-authored merge/content commits are GPG-signed and include DCO signoff.

Merge gate

Do not merge until NVSkills CI regenerates the evaluation/card/signature artifacts from the latest non-NVSkills source/content commit and the signature verification reports the PR head as current.

@copy-pr-bot

copy-pr-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@cuichenx

cuichenx commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

/nvskills-ci

1 similar comment
@cuichenx

cuichenx commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

/nvskills-ci

@cuichenx
cuichenx marked this pull request as ready for review July 2, 2026 21:25
@svcnvidia-nemo-ci

Copy link
Copy Markdown
Contributor

/nvskills-ci

@claude

claude Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

LGTM

Docs-only change: adds an HTML comment (NVSkills signature refresh request) after the frontmatter in skills/nemo-mbridge-perf-sequence-packing/SKILL.md, with no instruction changes. The comment sits after the closing frontmatter delimiter, so it does not interfere with YAML parsing. No code, logic, tests, or config are affected.

Suggested test cases:

  • No perf tests impacted.

@svcnvidia-nemo-ci

Copy link
Copy Markdown
Contributor

/nvskills-ci

@cuichenx

cuichenx commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

/nvskills-ci

7 similar comments
@cuichenx

cuichenx commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

/nvskills-ci

@cuichenx

cuichenx commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

/nvskills-ci

@cuichenx

cuichenx commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

/nvskills-ci

@cuichenx

cuichenx commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

/nvskills-ci

@cuichenx

cuichenx commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

/nvskills-ci

@cuichenx

cuichenx commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

/nvskills-ci

@cuichenx

cuichenx commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

/nvskills-ci

Signed-off-by: Chen Cui <chcui@nvidia.com>
@cuichenx
cuichenx force-pushed the automation/nvskills-signature-refresh-20260702 branch from 12967f2 to d3ea0be Compare July 3, 2026 00:11
@cuichenx

cuichenx commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

/nvskills-ci

Signed-off-by: nvskills-svc-account <svc-nvskills-signing@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Jul 3, 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.

Signed-off-by: Chen Cui <chcui@nvidia.com>
@cuichenx cuichenx changed the title [automation] chore: refresh stale NVSkills signatures (2026-07-02) docs(skills): repair sequence-packing guidance and refresh signature Jul 6, 2026
@cuichenx

cuichenx commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

/nvskills-ci

Signed-off-by: nvskills-svc-account <svc-nvskills-signing@nvidia.com>
@cuichenx cuichenx added the docs-only With great power comes great responsibility. label Jul 6, 2026
@cuichenx
cuichenx marked this pull request as ready for review July 6, 2026 20:57
@cuichenx

cuichenx commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 8c260d1

@claude

claude Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

line1
line2

@claude

claude Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

LGTM - documentation-only update to the nemo-mbridge-perf-sequence-packing skill (BENCHMARK.md, SKILL.md, card.yaml, skill-card.md, sigstore bundle). I verified every code anchor and test reference in the revised SKILL.md against the current tree and they all resolve correctly:

  • finetune_utils.py:110-125, config.py:1219-1247 and 1399-1441 - line ranges and code match.
  • sequence_batching.py - prepare_padded_or_packed_sequence_batch (L397) and pack_right_padded_sequence_batch_to_mcore_thd (L290) exist as cited.
  • gpt_step.py packed-THD cu_seqlens constraint matches _cu_seqlens_for_cp_partition.
  • Verification -k filters map to real tests: offline_and_in_batch_packing_are_mutually_exclusive, deferred_in_batch_packing -> test_forward_step_rejects_deferred_in_batch_packing, packed_metadata -> test_get_batch_consumes_collated_packed_metadata.
  • New/renamed paths (tests/unit_tests/data/vlm_datasets/test_batching.py, tests/functional_tests/test_groups/training/test_seqpacking_cp_example.py) both exist.

No bugs, typos, or stale references found. The clarified CP-block comment (offline packing is not finalized by ConfigContainer; LCM is auto-computed for in-batch packing only) is consistent with config.py:1240-1247.

Suggested test cases

No perf tests impacted - this PR touches only skill markdown/metadata under skills/nemo-mbridge-perf-sequence-packing/ and no scripts/performance/configs/ files. The verification commands documented in the skill are the relevant coverage:

  • tests/unit_tests/training/utils/test_packed_seq_utils.py
  • tests/unit_tests/training/test_config.py (packed_sequence / enable_in_batch_packing / offline_and_in_batch_packing_are_mutually_exclusive / context_parallel_seq_length_divisibility / context_parallel_finetuning_validations)
  • tests/unit_tests/data/vlm_datasets/test_batching.py
  • tests/unit_tests/training/test_vlm_step.py (deferred_in_batch_packing / packed_metadata)

cuichenx added 2 commits July 6, 2026 14:09
Signed-off-by: Chen Cui <chcui@nvidia.com>
Signed-off-by: Chen Cui <chcui@nvidia.com>
@svcnvidia-nemo-ci

Copy link
Copy Markdown
Contributor

/nvskills-ci

svc-nvskills-signing and others added 2 commits July 6, 2026 21:26
Signed-off-by: nvskills-svc-account <svc-nvskills-signing@nvidia.com>
Signed-off-by: Chen Cui <chcui@nvidia.com>
@svcnvidia-nemo-ci

Copy link
Copy Markdown
Contributor

/nvskills-ci

Signed-off-by: nvskills-svc-account <svc-nvskills-signing@nvidia.com>
@cuichenx

cuichenx commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test a7d8b57

@cuichenx
cuichenx merged commit 9c4b997 into main Jul 6, 2026
40 checks passed
@cuichenx
cuichenx deleted the automation/nvskills-signature-refresh-20260702 branch July 6, 2026 22:42
chochowski pushed a commit to chochowski/Megatron-Bridge that referenced this pull request Jul 21, 2026
…VIDIA-NeMo#4636)

Signed-off-by: Chen Cui <chcui@nvidia.com>
Signed-off-by: nvskills-svc-account <svc-nvskills-signing@nvidia.com>
Co-authored-by: nvskills-svc-account <svc-nvskills-signing@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-only With great power comes great responsibility.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants