Skip to content

feat: input validation & model capability#1542

Merged
akoumpa merged 20 commits intomainfrom
akoumparouli/feat_input_validation
Mar 17, 2026
Merged

feat: input validation & model capability#1542
akoumpa merged 20 commits intomainfrom
akoumparouli/feat_input_validation

Conversation

@akoumpa
Copy link
Copy Markdown
Contributor

@akoumpa akoumpa commented Mar 13, 2026

What does this PR do ?

Example:

>> model = NeMoAutoModelForCausalLM.from_pretrained("nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-BF16")
>> print(model.supports_generate)
>> True

Introduces a model capabilities mixin, which allows users to query a model instance for the following attributes:
model.

  • supports_tp
  • supports_pp
  • supports_cp
  • supports_ep
  • supports_tp_plan # HF compat
  • supports_pp_plan # HF compat
  • supports_sequence_packing
  • supports_gradient_checkpointing
  • supports_cp_with_sequence_packing
  • supports_generate
  • is_custom_model

The above information is used together with current device_mesh configuration to validate whether the input parallelism configuration is valid or not.

Additionally, at the train loop level, we can check for things like context parallelism + sequence packing support.

Changelog

  • Add specific line by line info of high level changes in this PR.

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you add or update any necessary documentation?

If you haven't finished some of the above items you can still open "Draft" PR.

Additional Information

  • Related to # (issue)

akoumpa added 3 commits March 12, 2026 20:26
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented Mar 13, 2026

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.

akoumpa added 5 commits March 12, 2026 20:46
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
@akoumpa
Copy link
Copy Markdown
Contributor Author

akoumpa commented Mar 13, 2026

/ok to test 6a6fe26

Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
@akoumpa
Copy link
Copy Markdown
Contributor Author

akoumpa commented Mar 13, 2026

/ok to test 125ebdc

Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
@akoumpa
Copy link
Copy Markdown
Contributor Author

akoumpa commented Mar 14, 2026

/ok to test aa9aec1

akoumpa added 2 commits March 16, 2026 13:57
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
@akoumpa
Copy link
Copy Markdown
Contributor Author

akoumpa commented Mar 16, 2026

/ok to test 2fb9709

Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
@akoumpa
Copy link
Copy Markdown
Contributor Author

akoumpa commented Mar 16, 2026

/ok to test 4a32efd

Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
@akoumpa
Copy link
Copy Markdown
Contributor Author

akoumpa commented Mar 17, 2026

/ok to test 7da29da

adil-a
adil-a previously approved these changes Mar 17, 2026
@akoumpa
Copy link
Copy Markdown
Contributor Author

akoumpa commented Mar 17, 2026

/ok to test ac100ab

Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
@akoumpa
Copy link
Copy Markdown
Contributor Author

akoumpa commented Mar 17, 2026

/ok to test ab0746d

@akoumpa
Copy link
Copy Markdown
Contributor Author

akoumpa commented Mar 17, 2026

/claude review

Comment thread nemo_automodel/_transformers/capabilities.py
@akoumpa
Copy link
Copy Markdown
Contributor Author

akoumpa commented Mar 17, 2026

/ok to test 654b9ad

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