← Back to Pull requests

[model] test: guard Qwen3-VL MTP CP/SP embedding locality #3979

Closed
unknown closed this pull request without merging on Jul 15, 2026 03:38 UTC
View on GitHub
unknown unknown commented on May 26, 2026 15:28 UTC
Author

Summary

Current main changed the Qwen3-VL MTP data flow in #4532: dense and packed context-parallel input IDs are now localized before entering the text model. That supersedes this PR’s original inner CP-shard implementation; retaining it would shard MTP embeddings twice.

This update merges current main, preserves the text model’s SP-only embedding wrapper, and adds regression coverage for both sides of the corrected contract.

Tracking issue: #4328. Production behavior was superseded by #4532.

Changes

  • Add an outer-model dense-CP regression proving input IDs, MRoPE positions, labels, and loss masks use the same zigzag rank-local partition before the language/MTP model.

  • Add a CP+SP text-model regression proving already-local MTP embeddings keep their sequence length and receive exactly one SP scatter through the explicit TP group.

  • Preserve current-main packed-CP and padded-boundary behavior.
  • Validation

  • 10 passed: complete Qwen3-VL text-model forward unit file, dense-CP producer handoff, packed-CP one-partition handoff, and full-vs-local split helper.

  • uv run pre-commit run --all-files: passed.

  • Three independent semantic/test/comment review rounds completed; final round found no actionable code or test issues.
  • The historical L1_Launch_recipes_qwen failure did not reach recipe execution. One distributed test-data fixture rank received a GitHub release API 401 Bad credentials; the other rank downloaded successfully. Exact-SHA CI is being rerun for this update.

    End-to-end context

    The contributor’s earlier CP=4/SP=true MTP smoke completed 32 iterations with finite, decreasing LM and MTP losses and no skipped or NaN iterations. The final PR now guards the current-main implementation that provides this locality contract rather than restoring the superseded inner shard.

    Diff: 229 lines (+171 / -58) across 2 files Reviewer: HowardZorn Review duration: 71290m
    All Vouch review confidence checks passed
    Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 229 lines diff across 2 files
    0.37
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.325
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #3979"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 37.0% (MEDIUM) · Higher = larger blast radius
    37.0%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 14.6% · Safe to merge
    14.6%