← Back to Pull requests

Perf/rollout multiple graph captures #9153

Open
unknown opened this pull request with 199 lines diff across 2 files
View on GitHub
unknown unknown commented on Nov 23, 2026 19:41 UTC
Author

What


Adds a decode bucket ladder to continuous rollout graph capture: decode
graphs are captured lazily at powers-of-two widths (plus max_batch_size)
and each decode step replays the smallest captured width covering the
rows doing work, instead of always replaying the full-batch graph. A
failed capture falls back to an eager forward for that bucket; new stats
report captures, bucket widths, and padded rows.

Why


A multi-turn rollout re-submits every conversation with the tokens it
just generated, and conversations end turns at different times, so the
live batch drains over the run. A single max-batch-sized graph pays
full-width padding on every late step; the ladder only pads to the next
captured width.

Results (1x A100-SXM4-40GB, driver 595.71.05, torch 2.15.0+cu132, bf16;


16 conversations x 4 staggered turns, 256 new tokens/turn, max_batch_size 16,
seed 0, best of 5 after 2 warmups)

| model | wide tok/s | ladder tok/s | speedup | row-steps | pad rows |
|-----------|-----------:|-------------:|--------:|-----------------|------------|
| Qwen3-4B | 294.5 | 388.8 | 1.32x | 16320 -> 11220 (0.69x) | 6120 -> 1020 |
| Qwen3-8B | 254.7 | 323.7 | 1.27x | 16320 -> 11220 (0.69x) | 6120 -> 1020 |

KV-cache footprint is unchanged (same max-batch static cache in both
configurations); only the replayed width per step shrinks.

Tests


  • python benchmarks/rollout/bench_graph_capture_ladder.py --model Qwen/Qwen3-4B --device cuda --dtype bf16 --conversations 16 --turns 4 --max-batch-size 16 --max-new-tokens 256 --trials 5 --warmup 2
  • Diff: 199 lines (+149 / -50) across 2 files Reviewer: delock Review duration: 10345m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.36) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.36 · 199 lines diff across 2 files
    0.36
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    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
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.317
    Real PR Conversation Timeline
    1 comments
    "Review active on #9153"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% 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: 36.1% (MEDIUM) · Higher = larger blast radius
    36.1%
    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: 46.7% · Lower = rushed or shallow review
    46.7%
    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: 19.3% · Safe to merge
    19.3%