Skip to content

[None][feat] Support final-boundary snapshot reuse for V2 Mamba#16473

Closed
VALLIS-NERIA wants to merge 9 commits into
NVIDIA:mainfrom
VALLIS-NERIA:agent/mamba-save-last-snapshot-reuse
Closed

[None][feat] Support final-boundary snapshot reuse for V2 Mamba#16473
VALLIS-NERIA wants to merge 9 commits into
NVIDIA:mainfrom
VALLIS-NERIA:agent/mamba-save-last-snapshot-reuse

Conversation

@VALLIS-NERIA

Copy link
Copy Markdown
Collaborator

@coderabbitai summary

Description

This PR adds optional final-boundary snapshot reuse for the V2 Mamba cache manager introduced by the V2 Mamba core PR.

The changes:

  • Add the mamba_save_last_snapshot LLM option and propagate the stable reusable prompt boundary through executor requests without changing existing positional request APIs.
  • Derive the stable boundary only when save-last mode is enabled, including requests pre-tokenized by serve.Router; preserve the forwarded prompt's special-token semantics and only accept a true token-ID prefix.
  • Treat stable-template rendering as a best-effort optimization so unsupported templates do not reject otherwise valid chat requests.
  • Reserve one final snapshot slot per concurrent request and save the last stable Mamba state independently of periodic snapshots.
  • Guard the C++ memory estimator when mamba_state_cache_interval=0.
  • Restrict save-last mode to the V2 Python manager and reject unsupported C++/mixed, fallback, and current disaggregated routes explicitly.
  • Update telemetry, API-stability references, the golden LLM-args manifest, and focused unit tests.

This PR depends on the V2 Mamba core PR, #16471. It is independent of the V2 Mamba disaggregated-serving follow-up. Because an upstream PR cannot use a fork-only branch as its base, this draft temporarily shows the prerequisite changes until they merge and the branch is rebased.

Test Coverage

  • Focused save-last, request-boundary, router, and request-priority tests (49 passed)
  • C++ interval-zero estimator test (1 passed)
  • Final request-priority, serving-boundary, and API-stability suite (79 passed)
  • python3 scripts/generate_llm_args_golden_manifest.py
  • pre-commit run --from-ref origin/main --to-ref HEAD

PR Checklist

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

@VALLIS-NERIA VALLIS-NERIA added the api-compatible Accepted LLM API contract change that is backwards-compatible label Jul 16, 2026
@VALLIS-NERIA

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59618 [ run ] triggered by Bot. Commit: 564b8fb Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59618 [ run ] completed with state SUCCESS. Commit: 564b8fb
/LLM/main/L0_MergeRequest_PR pipeline #48055 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: Xiwen Yu <13230610+VALLIS-NERIA@users.noreply.github.com>
Signed-off-by: Xiwen Yu <13230610+VALLIS-NERIA@users.noreply.github.com>
Signed-off-by: Xiwen Yu <13230610+VALLIS-NERIA@users.noreply.github.com>
Signed-off-by: Xiwen Yu <13230610+VALLIS-NERIA@users.noreply.github.com>
Signed-off-by: Xiwen Yu <13230610+VALLIS-NERIA@users.noreply.github.com>
Signed-off-by: Xiwen Yu <13230610+VALLIS-NERIA@users.noreply.github.com>
Signed-off-by: Xiwen Yu <13230610+VALLIS-NERIA@users.noreply.github.com>
@VALLIS-NERIA
VALLIS-NERIA force-pushed the agent/mamba-save-last-snapshot-reuse branch from 564b8fb to f2cb294 Compare July 16, 2026 08:04
@VALLIS-NERIA

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59670 [ run ] triggered by Bot. Commit: f2cb294 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59670 [ run ] completed with state FAILURE. Commit: f2cb294
/LLM/main/L0_MergeRequest_PR pipeline #48103 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: Xiwen Yu <13230610+VALLIS-NERIA@users.noreply.github.com>
Signed-off-by: Xiwen Yu <13230610+VALLIS-NERIA@users.noreply.github.com>
@VALLIS-NERIA
VALLIS-NERIA force-pushed the agent/mamba-save-last-snapshot-reuse branch from f2cb294 to 2349492 Compare July 16, 2026 09:09

Copy link
Copy Markdown
Collaborator Author

Reopened as a stacked draft at VALLIS-NERIA#10 so it can target the V2 Mamba core branch and show only its single squashed commit. Closing this upstream draft as superseded.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants