Skip to content

[None][fix] Warn when DFlash is used with disaggregated serving - #19352

Open
brnguyen2 wants to merge 1 commit into
NVIDIA:mainfrom
brnguyen2:prep/disagg-upstream-20260916
Open

brnguyen2 wants to merge 1 commit into
NVIDIA:mainfrom
brnguyen2:prep/disagg-upstream-20260916

Conversation

@brnguyen2

@brnguyen2 brnguyen2 commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Description

DFlash builds the draft model's cross-attention context from target hidden states captured during prefill. A disaggregated generation server does not prefill: it receives the target KV cache through the cache transceiver, which does not carry the drafter's context. The generation server therefore drafts without the prompt, and its draft positions are based at zero rather than the request's true sequence positions.

This path already runs today: DFlashSpecMetadata.prepare assigns each disaggregated generation request its own drafter slot, and drafts are verified against the target, so output is unaffected — only the acceptance rate suffers, silently.

This PR logs a warning from TorchLlmArgs.validate_speculative_config when DFlash is combined with a configured cache transceiver backend, so the cost is visible at startup. The configuration is not rejected; the predicate matches the existing disaggregation test used by validate_early_first_token_response.

Test Coverage

tests/unittest/llmapi/test_llm_args.py (cpu_only): the warning fires for all five transceiver backends in both object and dict config form; it does not fire for DFlash without a transceiver backend, or for disaggregated serving with other speculative algorithms.

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.

Dev Engineer Review

TorchLlmArgs.validate_speculative_config now warns when DFlash uses a cache transceiver backend. The configuration remains valid, but draft acceptance may decrease because generation servers lack prompt context. Other speculative algorithms and configurations without a transceiver backend remain unaffected.

QA Engineer Review

tests/unittest/llmapi/test_llm_args.py adds parameterized coverage for five transceiver backends in object and dictionary forms. Tests cover warning, acceptance, and non-warning paths. No integration test-list change applies to this unit test file. Coverage is sufficient, but the downstream L0_MergeRequest_PR pipeline failed and needs follow-up.

Per-File QA Perspective

  • tensorrt_llm/llmapi/llm_args.py: Verify that the warning triggers only for DFlash with a cache transceiver backend. Verify that validation still accepts the configuration.
  • tests/unittest/llmapi/test_llm_args.py: Covers supported backends, configuration representations, and regression paths. This unit test file does not require an integration test-list entry.

@brnguyen2

Copy link
Copy Markdown
Collaborator Author

/bot run

@coderabbitai

coderabbitai Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 93cae842-d5a1-4473-a7e7-79fd27f395dd

📥 Commits

Reviewing files that changed from the base of the PR and between 979eed5 and 0088128.

📒 Files selected for processing (2)
  • tensorrt_llm/llmapi/llm_args.py
  • tests/unittest/llmapi/test_llm_args.py

Included review availability: Your plan provides up to 12 included reviews per hour; 10 remain after this review.


Walkthrough

DFlash validation now warns when disaggregated generation uses a cache transceiver backend. The configuration remains accepted. Tests cover supported backends, dictionary inputs, backend-less configurations, and non-DFlash decoding.

Changes

DFlash disaggregation handling

Layer / File(s) Summary
Warning behavior and validation coverage
tensorrt_llm/llmapi/llm_args.py, tests/unittest/llmapi/test_llm_args.py
DFlash configurations with cache transceiver backends now emit a warning about reduced acceptance caused by missing drafter prompt context. Tests cover supported backends, dictionary inputs, backend-less configurations, and non-DFlash decoding.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Suggested reviewers: bowenfu

Merge Risk: ⚪ Minimal · up to 00881

The warning behavior correctly covers configured DFlash transceivers without changing accepted configurations or output correctness.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 2 files. 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 follows the required format and clearly describes the main change: adding a warning when DFlash is used with disaggregated serving.
Description check ✅ Passed The description explains the problem, solution, expected impact, configuration behavior, and relevant test coverage. It includes the required sections and checklist.
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

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

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #74119 [ run ] triggered by Bot. Commit: 979eed5 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #74119 [ run ] completed with state SUCCESS. Commit: 979eed5
/LLM/main/L0_MergeRequest_PR pipeline #60956 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

@brnguyen2 brnguyen2 added the api-compatible Accepted LLM API contract change that is backwards-compatible label Sep 17, 2026
DFlash builds the draft model's cross-attention context from target hidden
states captured during prefill. A disaggregated generation server does not
prefill: it receives the target KV cache through the transceiver, which does
not carry the drafter's context. The generation server therefore drafts
without the prompt, and its draft positions are based at zero rather than the
request's true sequence positions.

This path already runs: DFlashSpecMetadata.prepare assigns each disaggregated
generation request its own drafter slot, and drafts are verified against the
target, so output is unaffected. Only the acceptance rate suffers, silently.

Log a warning from TorchLlmArgs.validate_speculative_config when DFlash is
combined with a configured cache transceiver backend, so the cost is visible
at startup. The configuration is not rejected; the predicate matches the
existing disaggregation test used by validate_early_first_token_response.

Add configuration tests covering all five transceiver backends in both object
and dict form, plus cases asserting the warning is not emitted for DFlash
without a transceiver backend or for disaggregated serving with other
speculative algorithms.

Signed-off-by: Brian Nguyen <brnguyen@nvidia.com>
@brnguyen2
brnguyen2 force-pushed the prep/disagg-upstream-20260916 branch from 979eed5 to 0088128 Compare September 17, 2026 16:01
@brnguyen2

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #74152 [ run ] triggered by Bot. Commit: 0088128 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #74152 [ run ] completed with state SUCCESS. Commit: 0088128
/LLM/main/L0_MergeRequest_PR pipeline #60988 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

@brnguyen2

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #74182 [ run ] triggered by Bot. Commit: 0088128 Link to invocation

@brnguyen2

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #74217 [ run ] triggered by Bot. Commit: 0088128 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #74182 [ run ] completed with state ABORTED. Commit: 0088128

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #74217 [ run ] completed with state SUCCESS. Commit: 0088128
/LLM/main/L0_MergeRequest_PR pipeline #61044 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

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