Skip to content

test(qwen): probe chunked-prefill validation gap - #1324

Closed
chaofengw-nv wants to merge 3 commits into
NVIDIA:mainfrom
chaofengw-nv:test/qwen-chunked-prefill-false-green
Closed

chaofengw-nv wants to merge 3 commits into
NVIDIA:mainfrom
chaofengw-nv:test/qwen-chunked-prefill-false-green

Conversation

@chaofengw-nv

@chaofengw-nv chaofengw-nv commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Background

This Draft PR is an intentional mutation experiment. The Qwen long-context E2E case validates prefill receipts across 513 chunks, while semantic parity is covered only by a shorter case. This PR tests whether premerge can reject a semantic corruption that begins after the second prefill chunk.

Exit Criteria

  • Record the exact-head TRTMC Internal CI / Automated premerge gate result.
  • If premerge passes, treat that as evidence of a false-green validation gap.
  • If premerge fails on semantic correctness, treat that as evidence that an existing gate covers the mutation.
  • Do not merge this PR under any outcome.

Implementation

  • Deliberately replay the second 64-token input chunk for the third and every later prefill launch.
  • Preserve the prompt-token count, launch count, maximum chunk size, KV-cache capacity, and generated-token count observed by the existing runtime receipt checks.

Change categories

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

Validation

Commands and Results

  • clang-format --dry-run --Werror families/qwen/runtime/pipeline.cpp: passed.
  • pytest families/qwen/tests/test_e2e.py -q: 3 passed, 12 skipped; GPU E2E is intentionally left to exact-head premerge CI.

Hardware, Environment, and Revisions

  • Repository head: aa75b06e022d1fbe00f209affd4207c0911af72e.
  • Local validation: Linux CPU environment with the repository Python environment and system clang-format.
  • Target E2E: Qwen/Qwen3-0.6B at the manifest-pinned checkpoint revision, BF16 native KV cache.

Not Run / Remaining Gaps

  • No target-GPU E2E was run locally on this PR head; the experiment requires exact-head premerge CI to determine whether the intentional semantic corruption is detected.

Contributor Self-Review

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

Notes For Future Readers

  • Start review at QwenTextGenerationPipeline::run_prefill_batched.
  • This change intentionally corrupts model behavior and must never be merged. Close the PR after the CI observation is recorded.

Risk level

  • Low
  • Medium
  • High

High risk by design: the mutation silently substitutes stale prompt tokens after the second prefill chunk. The Draft state and explicit do-not-merge exit criterion are required safeguards.

Deliberately replay the second prefill chunk after the first two chunks. This mutation should corrupt long-prompt semantics while preserving the runtime receipt metrics checked by the existing long-context case.

This commit exists only to test whether premerge catches the false green and must not be merged.

Signed-off-by: chaofengw <chaofengw@nvidia.com>
@coderabbitai

coderabbitai Bot commented Sep 17, 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.

@chaofengw-nv chaofengw-nv added the run-internal-ci Maintainer-approved dispatch to internal CI label Sep 17, 2026
@github-actions github-actions Bot removed the run-internal-ci Maintainer-approved dispatch to internal CI label Sep 17, 2026
@chaofengw-nv chaofengw-nv added the run-internal-ci Maintainer-approved dispatch to internal CI label Sep 17, 2026
@github-actions github-actions Bot removed the run-internal-ci Maintainer-approved dispatch to internal CI label Sep 17, 2026
@chaofengw-nv

Copy link
Copy Markdown
Collaborator Author

Probe result

Confirmed false green. Do not merge this PR.

  • Tested head: aa75b06e022d1fbe00f209affd4207c0911af72e
  • Deliberate defect: prompts requiring at least three 64-token prefill chunks replay the second chunk from the third chunk onward, corrupting long-prompt semantics while preserving chunk/KV telemetry.
  • Exact-head result: TRTMC Internal CI / Automated premerge gate = PASS.

This demonstrates that the current premerge coverage can accept a Qwen chunked-prefill semantic regression. The PR remains Draft and must be closed, not merged, after the evidence is captured.

Make contract-only validation explicit and place the native-KV parity question in the third prefill chunk so stale or replayed input pointers fail the HF comparison.

Signed-off-by: chaofengw <chaofengw@nvidia.com>
@chaofengw-nv chaofengw-nv added the run-internal-ci Maintainer-approved dispatch to internal CI label Sep 18, 2026
@github-actions github-actions Bot removed the run-internal-ci Maintainer-approved dispatch to internal CI label Sep 18, 2026
Signed-off-by: chaofengw <chaofengw@nvidia.com>
@chaofengw-nv chaofengw-nv added the run-internal-ci Maintainer-approved dispatch to internal CI label Sep 18, 2026
@github-actions github-actions Bot removed the run-internal-ci Maintainer-approved dispatch to internal CI label Sep 18, 2026
@github-actions

Copy link
Copy Markdown

This is an automated Internal CI result; no review from an individual maintainer is requested.

TRTMC Protected CI result
=========================

Status: FAILED
Pull request: #1324
Head commit: 453245c91faa9386dd1c80dff78f3574ce42b4a8
Reason: Automated internal CI failed; details withheld

Protected failure details are not transferred to the public repository.

Open the public Source Actions run from the automated status link above.

@chaofengw-nv

Copy link
Copy Markdown
Collaborator Author

Final negative-control result

The experiment is complete. Do not merge this PR.

  • Current head: 453245c91faa9386dd1c80dff78f3574ce42b4a8
  • Public Stable Community CI: PASS
  • Public TRTMC Internal CI / Automated premerge gate: FAIL, as intended after adding the third-chunk semantic oracle
  • Clean test-only PR test(qwen): require third-chunk semantic parity #1337 at 5f47cc4b1c002d97ceb1f6fc2610bec92a2b59af: both public statuses PASS

This PR contains deliberate runtime corruption and is being closed as preserved negative-control evidence, without merge.

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