Skip to content

[TRTLLM-13394][feat] Support loading MTP weights from standalone checkpoint - #17378

Merged
mikeiovine merged 3 commits into
NVIDIA:mainfrom
mikeiovine:separate-mtp-checkpoints
Aug 14, 2026
Merged

[TRTLLM-13394][feat] Support loading MTP weights from standalone checkpoint#17378
mikeiovine merged 3 commits into
NVIDIA:mainfrom
mikeiovine:separate-mtp-checkpoints

Conversation

@mikeiovine

@mikeiovine mikeiovine commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Description

Support loading MTP weights from standalone checkpoints to support custom MTPs.

Test Coverage

New unit tests.

PR Checklist

Please review the following before submitting your PR:

  • PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.

  • PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.

  • Test cases are provided for new code paths (see test instructions)

  • If PR introduces API changes, an appropriate PR label is added - either api-compatible or api-breaking. For api-breaking, include BREAKING in the PR title.

  • Any new dependencies have been scanned for license and vulnerabilities

  • CODEOWNERS updated if ownership changes

  • Documentation updated as needed

  • Update tava architecture diagram if there is a significant design change in PR.

  • The reviewers assigned automatically/manually are appropriate for the PR.

  • Please check this after reviewing the above items as appropriate for this PR.

GitHub Bot Help

To see a list of available CI bot commands, please comment /bot help.

Dev Engineer Review

  • Adds support for standalone MTP checkpoint loading.
  • Filters and remaps MTP weights during target and draft-model loading.
  • Validates MTP configuration and required checkpoint tensors.
  • Preserves embedded MTP loading behavior.
  • Adds MTP checkpoint utilities and public decoding properties.
  • Updates speculative-model documentation.
  • No configuration-file or test-list changes were identified.
  • No correctness or API consistency issues were identified from the available change summary.

QA Engineer Review

  • Adds unit tests for MTP checkpoint detection, filtering, remapping, configuration updates, alias handling, target and draft loading, shared-head handling, and Nemotron-H mapping.
  • Updates the model-loader test helper to use needs_separate_draft_weights.
  • No matching entries exist in test-db/ or qa/.
  • Verdict: needs follow-up.

@mikeiovine mikeiovine added the api-compatible Accepted LLM API contract change that is backwards-compatible label Aug 7, 2026
@mikeiovine
mikeiovine marked this pull request as ready for review August 7, 2026 17:21
@mikeiovine
mikeiovine requested review from a team as code owners August 7, 2026 17:21
@mikeiovine
mikeiovine requested review from QiJune and cascade812 August 7, 2026 17:21
@mikeiovine

Copy link
Copy Markdown
Collaborator Author

/bot run

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

The PR adds support for loading MTP configuration and draft-head weights from separate speculative checkpoints. It updates configuration propagation, model loading, MTP head filtering, Nemotron-H handling, and unit tests.

Changes

Separate MTP checkpoint support

Layer / File(s) Summary
MTP configuration and checkpoint utilities
tensorrt_llm/_torch/speculative/utils.py, tensorrt_llm/llmapi/llm_args.py
MTP metadata can come from a separate speculative checkpoint. Utilities validate patterns, resolve layer counts, filter checkpoint tensors, and remap draft-model keys. Configuration identifies when separate draft weights are required.
Draft-weight loading orchestration
tensorrt_llm/_torch/pyexecutor/model_loader.py, tests/unittest/_torch/executor/test_model_loader_gms.py
A shared helper loads external draft weights or separate one-model MTP weights. Speculative MTP fields are applied before model construction.
Target and draft model weight handling
tensorrt_llm/_torch/models/modeling_speculative.py, tensorrt_llm/_torch/models/modeling_nemotron_h.py
Target loading excludes separately supplied MTP heads and registered aliases. Draft loading validates, remaps, and strictly loads separate MTP tensors. Nemotron-H supports zero embedded heads with an external speculative model.
Validation coverage
tests/unittest/_torch/speculative/hw_agnostic/test_mtp_separate_checkpoint.py
Tests cover configuration detection, metadata propagation, filtering, remapping, aliased heads, loading behavior, shared-head handling, and Nemotron-H mapping.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ModelLoader
  participant MTPUtilities
  participant SpeculativeCheckpoint
  participant SpecDecOneEngineForCausalLM
  ModelLoader->>MTPUtilities: resolve MTP configuration
  ModelLoader->>SpeculativeCheckpoint: load separate checkpoint
  ModelLoader->>SpecDecOneEngineForCausalLM: load draft weights
  SpecDecOneEngineForCausalLM->>MTPUtilities: select and remap mtp.* tensors
  SpecDecOneEngineForCausalLM->>SpecDecOneEngineForCausalLM: load MTP heads without partial loading
Loading

Suggested reviewers: qijune

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 21.43% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies support for loading MTP weights from standalone checkpoints.
Description check ✅ Passed The description explains the change, identifies new unit tests, and includes the required checklist sections.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🧹 Nitpick comments (6)
tests/unittest/_torch/speculative/hw_agnostic/test_mtp_separate_checkpoint.py (1)

120-133: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Move the import to the module header.

Line 121 imports remap_preprocessed_mtp_weights_for_draft_model inside the test, while every other utility comes from the module-level import block at lines 12-17. Add it to that block for consistency.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@tests/unittest/_torch/speculative/hw_agnostic/test_mtp_separate_checkpoint.py`
around lines 120 - 133, Move the remap_preprocessed_mtp_weights_for_draft_model
import from inside test_remap_preprocessed_mtp_weights_for_draft_model to the
module-level import block, and remove the local import while leaving the test
logic unchanged.
tensorrt_llm/_torch/speculative/utils.py (5)

136-141: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Fix the doubled braces in the docstring.

The docstring is not an f-string, so {{N[+h]}} and {{num_hidden_layers}} render with literal double braces. Use single braces.

📝 Proposed docstring fix
-    """Map ``model.layers.{{N[+h]}}.*`` keys onto ``mtp_layers.{{h}}.*``.
+    """Map ``model.layers.{N[+h]}.*`` keys onto ``mtp_layers.{h}.*``.
 
     Nemotron preprocess rewrites ``mtp.layers.*`` onto the target module path
-    ``model.layers.{{num_hidden_layers}}.*``. For a strict draft-only load we
+    ``model.layers.{num_hidden_layers}.*``. For a strict draft-only load we
     re-home those keys under ``draft_model.mtp_layers``.
     """
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tensorrt_llm/_torch/speculative/utils.py` around lines 136 - 141, Update the
docstring near the key-mapping description to replace the doubled braces in the
placeholders with single braces: use {N[+h]} and {num_hidden_layers}, while
preserving the surrounding text.

178-186: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Move json and os imports to module scope.

Both are standard-library modules with no import cycle risk. Importing them inside the try block adds noise and hides them from the configured import ordering.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tensorrt_llm/_torch/speculative/utils.py` around lines 178 - 186, Move the
json and os imports from the try block into the module-level imports in the
file, preserving the existing configuration-loading logic around cfg_path and
json.load unchanged.

63-67: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Annotate model_config and value.

The repository guidelines require every function to be annotated. Add types for both parameters, for example model_config: object (or a Protocol) and value: object.

As per coding guidelines: "Annotate every function, use None for procedures, avoid unnecessary Any and type: ignore".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tensorrt_llm/_torch/speculative/utils.py` around lines 63 - 67, Annotate the
model_config and value parameters in _set_pretrained_config_attr with concrete
types, using object or an appropriate Protocol for model_config and object for
value; retain the existing required annotation and bool return type.

Source: Coding guidelines


230-233: 🗄️ Data Integrity & Integration | 🔵 Trivial | 💤 Low value

Coerce draft_nextn before writing it to model_config.

Line 231 writes the raw JSON value, and line 233 returns int(draft_nextn). If config.json stores the count as a string, model_config.num_nextn_predict_layers keeps the string while spec_config.num_nextn_predict_layers becomes an int. Convert once before both uses.

♻️ Proposed fix
     if draft_nextn is not None:
-        _set_pretrained_config_attr(model_config, "num_nextn_predict_layers",
-                                    draft_nextn)
-        return int(draft_nextn)
+        draft_nextn = int(draft_nextn)
+        _set_pretrained_config_attr(model_config, "num_nextn_predict_layers",
+                                    draft_nextn)
+        return draft_nextn
     return None
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tensorrt_llm/_torch/speculative/utils.py` around lines 230 - 233, Coerce
draft_nextn to an integer before both uses in the draft_nextn handling block:
update _set_pretrained_config_attr to write the coerced value and return that
same value, keeping model_config.num_nextn_predict_layers and the returned spec
value consistent.

96-128: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Use parameterized generic types.

_pattern_to_mtp_layers_block_type, filter_mtp_checkpoint_weights, and select_mtp_checkpoint_weights return bare list / dict. Use list[str] and dict[str, torch.Tensor] so callers get precise types.

As per coding guidelines: "prefer built-in generic types and |".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tensorrt_llm/_torch/speculative/utils.py` around lines 96 - 128, Update the
return annotations of _pattern_to_mtp_layers_block_type,
filter_mtp_checkpoint_weights, and select_mtp_checkpoint_weights to use
parameterized built-in generics: list[str] for the pattern conversion result and
dict[str, torch.Tensor] for both checkpoint-weight helpers. Ensure torch is
available for the tensor type without changing runtime behavior.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tensorrt_llm/_torch/models/modeling_nemotron_h.py`:
- Around line 915-925: The duplicated MTP head-count validation in the Puzzle
setup must match the external-MTP behavior and use reliable runtime validation.
Extract the shared ckpt_nextn/model_nextn resolution, including the
speculative_model fallback to one shared head and the missing-MTP error, into a
helper, then call it from both MTP setup sites near the existing assertions;
replace assert-based validation with ValueError.

In `@tensorrt_llm/_torch/models/modeling_speculative.py`:
- Around line 2212-2233: Move the hardcoded required_suffixes validation out of
SpecDecOneEngineForCausalLM by adding an mtp_required_weight_suffixes()
model-level hook that defaults to an empty tuple, and use its result when
validating remapped weights. Override this hook in NemotronHForCausalLM with the
existing Nemotron tensor suffixes, preserving the current missing-tensor error
behavior for that model while allowing other MTP architectures to bind without
these assumptions.
- Around line 2191-2194: Replace the printf-style arguments with a single
f-string argument for each affected logger.warning call: modeling_speculative.py
lines 2191-2194, speculative/utils.py lines 88-92, and speculative/utils.py
lines 187-191. Preserve each message’s existing values and wording while
ensuring the interpolated counts or strings are rendered before logging.

In `@tensorrt_llm/_torch/pyexecutor/model_loader.py`:
- Around line 1113-1118: Initialize or populate self.weight_mapper in the GMS RW
preload path before the one-model separate-MTP-checkpoint branch assigns
draft_weight_mapper. Ensure the mapper is non-None when calling
model.load_draft_weights, while preserving the existing mapper behavior for
configurations that already provide one.

In
`@tests/unittest/_torch/speculative/hw_agnostic/test_mtp_separate_checkpoint.py`:
- Around line 1-261: Update the appropriate files under
tests/integration/test_lists/ to register test_mtp_separate_checkpoint.py,
following sibling hw_agnostic speculative test entries; add at least one focused
test for SpecDecOneEngineForCausalLM.load_draft_weights covering the
separate-MTP path and its strict loading behavior. Include a summary stating
whether each changed test is listed in the appropriate test-list files and
provide a coverage verdict.

---

Nitpick comments:
In `@tensorrt_llm/_torch/speculative/utils.py`:
- Around line 136-141: Update the docstring near the key-mapping description to
replace the doubled braces in the placeholders with single braces: use {N[+h]}
and {num_hidden_layers}, while preserving the surrounding text.
- Around line 178-186: Move the json and os imports from the try block into the
module-level imports in the file, preserving the existing configuration-loading
logic around cfg_path and json.load unchanged.
- Around line 63-67: Annotate the model_config and value parameters in
_set_pretrained_config_attr with concrete types, using object or an appropriate
Protocol for model_config and object for value; retain the existing required
annotation and bool return type.
- Around line 230-233: Coerce draft_nextn to an integer before both uses in the
draft_nextn handling block: update _set_pretrained_config_attr to write the
coerced value and return that same value, keeping
model_config.num_nextn_predict_layers and the returned spec value consistent.
- Around line 96-128: Update the return annotations of
_pattern_to_mtp_layers_block_type, filter_mtp_checkpoint_weights, and
select_mtp_checkpoint_weights to use parameterized built-in generics: list[str]
for the pattern conversion result and dict[str, torch.Tensor] for both
checkpoint-weight helpers. Ensure torch is available for the tensor type without
changing runtime behavior.

In
`@tests/unittest/_torch/speculative/hw_agnostic/test_mtp_separate_checkpoint.py`:
- Around line 120-133: Move the remap_preprocessed_mtp_weights_for_draft_model
import from inside test_remap_preprocessed_mtp_weights_for_draft_model to the
module-level import block, and remove the local import while leaving the test
logic unchanged.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 6a96cae8-8ae6-4aa4-b7a2-d9bb639c921b

📥 Commits

Reviewing files that changed from the base of the PR and between 2224cb7 and d5da445.

📒 Files selected for processing (6)
  • tensorrt_llm/_torch/models/modeling_nemotron_h.py
  • tensorrt_llm/_torch/models/modeling_speculative.py
  • tensorrt_llm/_torch/pyexecutor/model_loader.py
  • tensorrt_llm/_torch/speculative/utils.py
  • tensorrt_llm/llmapi/llm_args.py
  • tests/unittest/_torch/speculative/hw_agnostic/test_mtp_separate_checkpoint.py

Comment thread tensorrt_llm/_torch/models/modeling_nemotron_h.py Outdated
Comment thread tensorrt_llm/_torch/models/modeling_speculative.py
Comment thread tensorrt_llm/_torch/models/modeling_speculative.py Outdated
Comment thread tensorrt_llm/_torch/pyexecutor/model_loader.py
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64662 [ run ] triggered by Bot. Commit: d5da445 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64662 [ run ] completed with state SUCCESS. Commit: d5da445
/LLM/main/L0_MergeRequest_PR pipeline #52519 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

Comment thread tensorrt_llm/_torch/models/modeling_nemotron_h.py
Comment thread tensorrt_llm/_torch/models/modeling_nemotron_h.py
Comment thread tensorrt_llm/_torch/models/modeling_speculative.py
Comment thread tensorrt_llm/_torch/models/modeling_speculative.py
Comment thread tensorrt_llm/_torch/models/modeling_speculative.py
Comment thread tensorrt_llm/_torch/models/modeling_speculative.py Outdated
Comment thread tensorrt_llm/_torch/models/modeling_speculative.py
Comment thread tensorrt_llm/_torch/models/modeling_speculative.py Outdated
Comment thread tensorrt_llm/_torch/speculative/utils.py Outdated
Comment thread tensorrt_llm/_torch/speculative/utils.py Outdated
@mikeiovine
mikeiovine force-pushed the separate-mtp-checkpoints branch from d5da445 to 8e99519 Compare August 10, 2026 15:42
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tensorrt_llm/_torch/speculative/utils.py`:
- Around line 63-67: Add precise Python 3.10+ annotations to the helper APIs in
this module, including _set_pretrained_config_attr and the additionally flagged
functions, replacing untyped parameters, bare dict/list types, and generic
values with the existing configuration and tensor-mapping types used by
checkpoint loading. Annotate return types as well, while preserving the current
behavior and API contract.
- Around line 88-92: Update the warning calls in the relevant helper around the
non-required MTP config path and the analogous block near the second warning
site to preformat the message as a single f-string, replacing the printf-style
"%s" argument usage while preserving the existing warning text and message
context.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 81d9aa5b-b36b-4ecc-802f-c8d2a3704d70

📥 Commits

Reviewing files that changed from the base of the PR and between 0f6f2d8 and 8e99519.

📒 Files selected for processing (6)
  • tensorrt_llm/_torch/models/modeling_nemotron_h.py
  • tensorrt_llm/_torch/models/modeling_speculative.py
  • tensorrt_llm/_torch/pyexecutor/model_loader.py
  • tensorrt_llm/_torch/speculative/utils.py
  • tensorrt_llm/llmapi/llm_args.py
  • tests/unittest/_torch/speculative/hw_agnostic/test_mtp_separate_checkpoint.py
🚧 Files skipped from review as they are similar to previous changes (4)
  • tensorrt_llm/_torch/models/modeling_nemotron_h.py
  • tensorrt_llm/llmapi/llm_args.py
  • tensorrt_llm/_torch/pyexecutor/model_loader.py
  • tensorrt_llm/_torch/models/modeling_speculative.py

Comment thread tensorrt_llm/_torch/speculative/utils.py
Comment thread tensorrt_llm/_torch/speculative/utils.py
@mikeiovine
mikeiovine force-pushed the separate-mtp-checkpoints branch from 8e99519 to 7fc6763 Compare August 10, 2026 15:58
@mikeiovine

Copy link
Copy Markdown
Collaborator Author

/bot run

@mikeiovine

Copy link
Copy Markdown
Collaborator Author

Did not address most comments about local imports because they are required to avoid circular imports

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65068 [ run ] triggered by Bot. Commit: 7fc6763 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65068 [ run ] completed with state SUCCESS. Commit: 7fc6763
/LLM/main/L0_MergeRequest_PR pipeline #52873 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@mikeiovine

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65117 [ run ] triggered by Bot. Commit: 7fc6763 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65117 [ run ] completed with state SUCCESS. Commit: 7fc6763
/LLM/main/L0_MergeRequest_PR pipeline #52914 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@mikeiovine

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65308 [ run ] triggered by Bot. Commit: 7fc6763 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65308 [ run ] completed with state SUCCESS. Commit: 7fc6763
/LLM/main/L0_MergeRequest_PR pipeline #53084 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

Comment thread tensorrt_llm/_torch/models/modeling_speculative.py Outdated
Comment thread tensorrt_llm/_torch/models/modeling_speculative.py Outdated
Comment thread tensorrt_llm/_torch/models/modeling_speculative.py
Signed-off-by: Mike Iovine <6158008+mikeiovine@users.noreply.github.com>
Signed-off-by: Mike Iovine <miovine@nvidia.com>
@mikeiovine
mikeiovine force-pushed the separate-mtp-checkpoints branch from 7fc6763 to add170d Compare August 11, 2026 18:58
@mikeiovine

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65372 [ run ] triggered by Bot. Commit: add170d Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65372 [ run ] completed with state SUCCESS. Commit: add170d
/LLM/main/L0_MergeRequest_PR pipeline #53135 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@mikeiovine

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65619 [ run ] triggered by Bot. Commit: add170d Link to invocation

Signed-off-by: Mike Iovine <miovine@nvidia.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
tests/unittest/_torch/speculative/hw_agnostic/test_mtp_separate_checkpoint.py (1)

47-47: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add function annotations.

Annotate each pytest fixture parameter and add -> None to these test functions. This follows the required Python interface convention.

As per coding guidelines: “Annotate every function.”

Also applies to: 62-62, 73-73, 85-85, 307-307

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@tests/unittest/_torch/speculative/hw_agnostic/test_mtp_separate_checkpoint.py`
at line 47, Annotate the affected test functions, including
test_speculative_model_equal_to_target_keeps_embedded_mtp and the other
referenced tests, with `-> None`; add appropriate type annotations to every
pytest fixture parameter such as tmp_path, using the project’s established
fixture annotation types.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In
`@tests/unittest/_torch/speculative/hw_agnostic/test_mtp_separate_checkpoint.py`:
- Line 47: Annotate the affected test functions, including
test_speculative_model_equal_to_target_keeps_embedded_mtp and the other
referenced tests, with `-> None`; add appropriate type annotations to every
pytest fixture parameter such as tmp_path, using the project’s established
fixture annotation types.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 8e9c94d1-79ac-4e31-831d-da08c08a179d

📥 Commits

Reviewing files that changed from the base of the PR and between add170d and 2b772a7.

📒 Files selected for processing (5)
  • tensorrt_llm/_torch/models/modeling_nemotron_h.py
  • tensorrt_llm/_torch/pyexecutor/model_loader.py
  • tensorrt_llm/_torch/speculative/utils.py
  • tensorrt_llm/llmapi/llm_args.py
  • tests/unittest/_torch/speculative/hw_agnostic/test_mtp_separate_checkpoint.py
🚧 Files skipped from review as they are similar to previous changes (3)
  • tensorrt_llm/_torch/models/modeling_nemotron_h.py
  • tensorrt_llm/llmapi/llm_args.py
  • tensorrt_llm/_torch/speculative/utils.py

@mikeiovine

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65648 [ run ] triggered by Bot. Commit: 2b772a7 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65619 [ run ] completed with state ABORTED. Commit: add170d

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65648 [ run ] completed with state SUCCESS. Commit: 2b772a7
/LLM/main/L0_MergeRequest_PR pipeline #53369 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

Signed-off-by: Mike Iovine <miovine@nvidia.com>
@mikeiovine

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #66022 [ run ] triggered by Bot. Commit: d66d958 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #66022 [ run ] completed with state SUCCESS. Commit: d66d958
/LLM/main/L0_MergeRequest_PR pipeline #53705 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@mikeiovine

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #66328 [ run ] triggered by Bot. Commit: d66d958 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #66328 [ run ] completed with state SUCCESS. Commit: d66d958
/LLM/main/L0_MergeRequest_PR pipeline #53976 completed with status: 'SUCCESS'

CI Report

Link to invocation

@mikeiovine
mikeiovine merged commit 791588e into NVIDIA:main Aug 14, 2026
7 checks passed
@mikeiovine
mikeiovine deleted the separate-mtp-checkpoints branch August 14, 2026 18:11
xinhe-nv pushed a commit to xinhe-nv/TensorRT-LLM that referenced this pull request Aug 17, 2026
…kpoint (NVIDIA#17378)

Signed-off-by: Mike Iovine <6158008+mikeiovine@users.noreply.github.com>
Signed-off-by: Mike Iovine <miovine@nvidia.com>
yihwang-nv pushed a commit to yihwang-nv/TensorRT-LLM that referenced this pull request Aug 18, 2026
…kpoint (NVIDIA#17378)

Signed-off-by: Mike Iovine <6158008+mikeiovine@users.noreply.github.com>
Signed-off-by: Mike Iovine <miovine@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-compatible Accepted LLM API contract change that is backwards-compatible ci: full pre-merge approved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants