Skip to content

feat(cli): add commands for ten decoder families - #1378

Draft
yifeif-nv wants to merge 1 commit into
NVIDIA:mainfrom
yifeif-nv:agent/family-cli-batch-5
Draft

yifeif-nv wants to merge 1 commit into
NVIDIA:mainfrom
yifeif-nv:agent/family-cli-batch-5

Conversation

@yifeif-nv

Copy link
Copy Markdown
Collaborator

Background

Follow up #1310 by moving ten existing families' CLI definitions and execution into their owning directories. New options can then be added without changing the public parser or shared build request.

Exit Criteria

  • Each family owns its build declaration, typed request, native handler and tests.
  • Existing defaults, supported inputs, legacy rejection behavior and numerical criteria are preserved.
  • Discovery, help, runtime staging and packaging use the existing generic protocol.

Implementation

Families: bloom, codegen, falcon, gpt2, gpt_neo, gpt_neox, opt, stablelm, starcoder2, xglm.

Adds build and generate, lazy Python build handlers and native adapter targets. Existing family runtime interfaces are reused inside owner handlers. Model graphs and build policies remain in their existing owners. Existing flat CLI entry points remain compatible; public Task ABI, bundle format and dependencies are unchanged.

A generic CI test fixture now derives its runtime files from the selected family declaration. The existing missing-testcase assertion is unchanged; missing descriptors and adapters remain errors. This is the only change outside the ten family directories.

Change categories

  • Model or runtime behavior
  • Public API
  • ABI
  • Bundle or artifact format
  • Dependencies
  • Documentation only
  • CI or developer tooling

Validation

Commands and Results

  • CI_BASE_REF=4b9cc2b0f259e8959e1a5c0e996506e60d7101b5 python3 -m tools.ci pipeline source-quality: passed, including 299 architecture and CI contract tests.
  • Owner CPU suite: 151 passed / 21 existing selector skips:
python3 -m pytest families/bloom/tests families/codegen/tests families/falcon/tests families/gpt2/tests families/gpt_neo/tests families/gpt_neox/tests families/opt/tests families/stablelm/tests families/starcoder2/tests families/xglm/tests -m "not gpu and not trt" -q -p no:cacheprovider
  • cmake --build /work/build --parallel 8 and ctest --test-dir /work/build --output-on-failure --label-exclude gpu: a local integration tree containing all five independent migration batches passed 268 tests / 7 expected no-device skips, including this batch's 10 native CLI handler tests.
  • python3 -m build --no-isolation --wheel --outdir /work/wheels -Cbuild-dir=/work/wheel-build .: the same integration tree built a real wheel; archive/installed validators passed for all 128 model families. Installed-only probes passed owner build dispatch for all 50 migrated families, 120 offline help commands and 70 native adapter family guards.
  • Model math/build-policy definitions and existing E2E assertions were compared with the baseline. The tests now call the owner entry points with the same acceptance criteria.

Hardware, Environment, and Revisions

Head: 64984d36a103ff7debcf1249d100152a7e2c37d5. Base: 4b9cc2b0f259e8959e1a5c0e996506e60d7101b5. Local Linux/aarch64 CPU-only validation used TensorRT 11.1.0.106 and Torch 2.12.0+cu130. Synthetic runtime fixtures and probe bundles were used for CLI integration; the skipped tests retain their existing explicit GPU/E2E selectors.

Not Run / Remaining Gaps

Fresh checkpoint GPU inference, numerical/performance qualification and TensorRT-RTX execution were not run locally. Remote premerge results are not claimed. These remain required before merge as applicable to the selected workloads.

Contributor Self-Review

  • I have completed a self-review of this change.

Reviewed family ownership, supported parameters/defaults, old Python-call compatibility, native input/output contracts and failure behavior. Publication is gated on an independent review of outgoing code, commit metadata, PR text and CI output paths.

Notes For Future Readers

This is batch 5 of five independent ten-family migrations on the same base; no batch depends on another. Review cli.json, cli.py, native cli.cpp, then owner tests. Remaining families can follow the same pattern. Remove the shared legacy CLI/request only after migration is complete.

Risk level

  • Low
  • Medium
  • High

Ten families gain a new command path and adapter artifacts. Explicit defaults, strict rejection, owner tests and installed-package checks cover the integration boundary; they do not replace model qualification.

Move build declarations, narrow request types, and native generation handlers into each decoder family. Preserve sampling defaults, legacy unsupported-input checks, and StableLM mixed-precision controls while exercising owner commands from existing E2E helpers.

Python CPU owner tests passed: 151 passed and 21 unselected E2E cases skipped. Existing model graph definitions and numerical assertions are unchanged.

Signed-off-by: yifeif <277870278+yifeif-nv@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Sep 18, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Comment @coderabbitai help to get the list of available commands.

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