Skip to content

perf(provider): chain batch-gated Qwen MTP decode; add concurrent runtime benchmark - #1543

Merged
Gajesh2007 merged 11 commits into
masterfrom
ttft/qwen-mtp-decode
Oct 22, 2026
Merged

Gajesh2007 merged 11 commits into
masterfrom
ttft/qwen-mtp-decode

Conversation

@Gajesh2007

@Gajesh2007 Gajesh2007 commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Status after the rebase (2026-10-22): this PR no longer moves any submodule. The batch-gated chained Qwen MTP decode it was opened for is already on master: the paired SDK PR Layr-Labs/mlx-swift-lm#330 squash-merged as fa63c270, and #1535 (a591744a2) re-pinned libs/mlx-swift-lm to SDK main 889fe3cc, which contains it. 2249321d0 re-pinned this branch to the same commit, so the gitlinks equal master (libs/mlx-swift-lm 889fe3cc, libs/mlx-swift 67dc7528, libs/mlx ad4745a2). What this PR now adds is the opt-in darkbloom benchmark --runtime-concurrency mode, plus the docs and changelog for the decode change that master already serves without them.

Summary

The inline Qwen MTP head speculates for one decode row only. Since #1535, master serves the SDK change that runs its rows as ordinary chained decode while two or more requests are decoding, still feeding the head history, instead of an unchained seed step with a vocabulary-wide policy top-two and an extra readback per step. The final prompt row also seeds the first speculative round. That change is default-on, and master has no changelog entry or configuration rows for its two rollback switches. This PR adds them, and adds the concurrent benchmark mode used to measure the change. On an M3 Ultra serving Qwen3.5-9B (pre-rebase build), concurrent decode is 11-19% faster at B = 2-8 and matches MTP off; first-token time does not change.

No production serving code changes in this PR.

Change Files
darkbloom benchmark --runtime-generation [--runtime-mtp] --runtime-concurrency 1,2,4,8 [--runtime-stagger]: one production slot per batch size, warmed by an identical batch, distinct greedy rows; per-row tokens, first/third/first-eight token times, decode rates, the all-rows decode window, chained steps and MTP metrics as JSON, with model, prompt, precision and assistant provenance. --runtime-stagger stops row i of B after max-tokens*(B-i)/B tokens so the cohort shrinks to one row. Malformed size lists and staggered runs with --max-tokens below 3×B are refused before the model loads; a narrower slot or a row that does not end where its request says exits with status 2 provider-swift/Sources/ProviderBenchmark/RuntimeConcurrencyBenchmark.swift, provider-swift/Sources/ProviderBenchmark/RuntimeConcurrencyBenchmarkReport.swift, provider-swift/Sources/darkbloom/BenchmarkCommand.swift
Verified target loading (MiMo refusal, Metal check, weight hash before and after the load, tokenizer, prompt rendering) shared by both runtime benchmarks; runtime-generation behavior unchanged provider-swift/Sources/ProviderBenchmark/RuntimeGenerationBenchmark.swift
Tests: list parsing, stagger quotas, early refusals, row terminals, median and all-rows window, report provenance, drain-while-submitting; CLI parse and refusal cases provider-swift/Tests/ProviderCoreTests/Benchmark/RuntimeConcurrencyBenchmarkTests.swift, provider-swift/Tests/DarkbloomCLITests/BenchmarkRuntimeGenerationOptionsTests.swift
Batch-gated chaining and prefill-carry paragraph docs/architecture/inference.md
DARKBLOOM_TTFT_QWEN_MTP_CHAINED and DARKBLOOM_TTFT_QWEN_MTP_CARRY rows docs/reference/configuration.md
--runtime-concurrency and --runtime-stagger rows docs/provider/cli-reference.md
Focused test filter includes the new suite docs/developer/test.md
Changelog fragment: the decode change, its rollback switches and the benchmark mode changelog.d/qwen-mtp-concurrent-decode.md

Commits: 458834a00 (originally the pins plus docs, changelog and benchmark), 2106ec2df (--runtime-stagger and earlyTokenMs), 5a648b911 (first refactor pass), master merges e6af07bc3 and 96b2bb9c1, 2249321d0 (re-pin to master's SDK 889fe3cc), master merge 77564d715, then this review round: 64ec98877, 9ed988a4b, f0f8a87f4 and e95d68876. Base: master @ 8f6958689.

Before

flowchart TB
  subgraph BB["Behavior on master 8f6958689"]
    direction LR
    s1["Qwen inline-MTP serving,<br/>2 or more rows decoding"]:::input --> s2["chained ordinary decode + prefill carry<br/>(SDK #330 via #1535, SDK 889fe3cc)"]:::same
    s2 --> s3["no changelog entry; rollback switches<br/>DARKBLOOM_TTFT_QWEN_MTP_CHAINED / _CARRY<br/>undocumented"]:::gap
    b1["darkbloom benchmark<br/>--runtime-generation"]:::input --> b2["one request on a width-1<br/>production slot: no concurrent<br/>decode view"]:::gap
  end
  subgraph BC["Code on master"]
    direction LR
    c1["Benchmark.run"]:::code --> c2["RuntimeGenerationBenchmark.run<br/>inline MiMo refusal, Metal, hash,<br/>load, re-hash, tokenizer, prompt"]:::code
    c2 --> c3["makeBenchmarkSession width 1<br/>one request, JSON report"]:::code
  end
  BB ~~~ BC
  classDef input fill:#dbeafe,stroke:#1d4ed8,color:#1e3a8a
  classDef same fill:#e5e7eb,stroke:#4b5563,color:#111827
  classDef gap fill:#fee2e2,stroke:#b91c1c,color:#7f1d1d
  classDef code fill:#e0e7ff,stroke:#4338ca,color:#1e1b4b
Loading

After

flowchart TB
  subgraph AB["Behavior with this PR"]
    direction LR
    s1["Qwen inline-MTP serving,<br/>2 or more rows decoding"]:::input --> s2["unchanged: same SDK pin 889fe3cc"]:::same
    s2 --> s3["documented: inference.md,<br/>configuration.md rows, changelog<br/>with the rollback switches"]:::new
    b1["darkbloom benchmark --runtime-generation<br/>--runtime-concurrency 1,2,4,8<br/>optional --runtime-stagger"]:::input --> b2{"well-formed sizes 1-64, and<br/>max-tokens at least 3xB if staggered?"}
    b2 -- no --> r1["refused before the model loads"]:::refuse
    b2 -- yes --> b3["verified load, then one production<br/>slot per size: warmup batch,<br/>measured batch"]:::new
    b3 --> b4{"slot width equals B and every row<br/>ends at its quota or a stop token?"}
    b4 -- yes --> o1["JSON report with provenance, exit 0"]:::new
    b4 -- no --> o2["refusedCells or failures in JSON, exit 2"]:::refuse
  end
  subgraph AC["Code with this PR"]
    direction LR
    c1["Benchmark.benchmarkModeConflict<br/>RuntimeConcurrencyBenchmark.batchSizes"]:::changed --> c2["RuntimeConcurrencyBenchmark.run<br/>rowMaxTokens"]:::new
    c2 --> c3["RuntimeGenerationBenchmark.loadVerifiedTarget<br/>shared with RuntimeGenerationBenchmark.run"]:::changed
    c3 --> c4["per size: makeBenchmarkSession,<br/>width check, measure, runBatch<br/>drains each row as it is submitted"]:::new
    c4 --> c5["summarize and rowFailure<br/>RuntimeConcurrencyBenchmarkReport.swift"]:::new
    c5 --> c6["shutdownReportingCompletion per cell,<br/>then releaseBenchmarkContainer"]:::new
  end
  AB ~~~ AC
  classDef input fill:#dbeafe,stroke:#1d4ed8,color:#1e3a8a
  classDef same fill:#e5e7eb,stroke:#4b5563,color:#111827
  classDef new fill:#dcfce7,stroke:#15803d,color:#14532d
  classDef changed fill:#fef9c3,stroke:#a16207,color:#713f12
  classDef refuse fill:#fee2e2,stroke:#b91c1c,color:#7f1d1d
Loading

Legend: blue is input, grey is unchanged serving behavior, red is a gap on master (Before) or a refusal (After), green is new behavior or code, yellow is existing code this PR changes. The serving box is the same in both figures: the decode change itself is on master already.

Measured effect (M3 Ultra, Qwen3.5-9B)

M3 Ultra (Mac15,14, fleet-representative, non-NAX), exclusive GPU lock. "Before" is the same binary with DARKBLOOM_TTFT_QWEN_MTP_CHAINED=0 DARKBLOOM_TTFT_QWEN_MTP_CARRY=0. These numbers measure the SDK decode change, which is now on master; this PR only documents it and adds the benchmark used here. Measured on the pre-rebase build (the same engine change on SDK 14661d9b, mlx.metallib fb1ba8f9…), with this PR's benchmark as it stood before this review round. The all-rows window and first-token formulas are unchanged since then; rows are now drained as soon as they are submitted, which can only move early arrival times earlier. Neither the rebased build nor master's SDK 889fe3cc (which also carries #322, #327, #328 and #329) was re-measured. Logs: qwen-mtp-decode/{m3u,m3u3}/*.json and qmtp-final/load/* in the program scratchpad.

Measurement MTP off Before After
Concurrent greedy decode, all-rows tok/s, B = 1 / 2 / 4 / 8 (m3u/p256-*.json, median of 2) 105.5 / 192.3 / 313.6 / 381.5 139.5 / 161.2 / 268.3 / 342.1 146.9 / 191.6 / 313.1 / 381.1
First token ms at B = 2 / 4 / 8 (same runs) 65.0 / 111.2 / 181.9 81.3 / 185.6 / 312.5 82.6 / 186.2 / 312.9
Load L1, 0.15 req/s, 37 requests: TTFT p50 / p90 / p99 s 1.05 / 4.28 / 6.15 1.57 / 4.60 / 7.14 1.56 / 4.65 / 7.00
Load L1: decode p50 tok/s 84.2 75.8 90.3
Load L2, 0.25 req/s, 62 requests (saturated): TTFT p50 / p90 / p99 s — 64.60 / 101.59 / 116.38 56.93 / 89.66 / 104.41
Load L2: decode p50 tok/s; output tok/s — 31.4; 110.42 33.4; 112.79
Staggered 4 → 1 rows, last-token ms (m3u3/stag4-*.json) 2934 / 2298 / 1617 / 894 3344 / 2823 / 1994 / 1127 2912 / 2383 / 1703 / 980

Load runs use run_load.sh (HTTP, Poisson arrivals, T = 0.7, width 4, the same seed per arm). Paired per request, TTFT changes by a median +0.000 s (L1) and -6.69 s (L2, lower for 55 of 62, 54 of them by more than 10 ms); excluding the client-side queue it changes by +0.002 s in both. At B >= 2 the tokens are identical to before on every row (256 tokens; M3 Ultra and M5 Ultra). The SDK PR has the B = 1 prompt suite, the token-time shift and the component split.

Side effects, verified in code

Concern Finding
Submodules and Metal library None. The gitlinks equal master (libs/mlx-swift-lm 889fe3cc, libs/mlx-swift 67dc7528, libs/mlx ad4745a2), so the built mlx.metallib is master's
Serving path No production serving code changes. The new code is under provider-swift/Sources/ProviderBenchmark/ and the benchmark command, behind --runtime-generation --runtime-concurrency
Memory, admission, capacity No KV, activation-floor, quotation or wire change in this PR. For the decode change on master: the [B, 1, H] hidden a seed step kept is now kept by the ordinary step
Prefix cache The benchmark forces prefix caches off (RuntimeGenerationBenchmark.prefixCacheDisabledEnvironment). For the decode change on master: assistant checkpoints are captured only at prompt positions, and prompt rows keep the MTP prefill path
Rollback The SDK reads both switches once per process (CBv2MTPConfig.envOrdinaryDecodeHistory, .envPrefillCarry). They are not in LaunchAgent.inferencePassthroughEnvKeys, so they reach a foreground darkbloom process or benchmark, not the launchd provider job. The docs and changelog say so
Benchmark teardown Each cell ends with shutdownReportingCompletion(). For non-native sessions that just calls shutdown(); for GLM5 Next a failed retirement now propagates and the container is kept. The shared EngineV2BenchmarkSession.shutdown() contract is unchanged for other callers
Telemetry and privacy None. The benchmark report holds hashes of the prompt and prompt tokens, not the prompt text

Review follow-ups (this round)

Fixed, one commit per concern group; each review thread has a reply naming its fix:

Thread Fix Commit
Average the middle rates for even batch sizes medianRowDecodeTokensPerSecond uses ThroughputSweep.median (two-sided) 9ed988a4b
Reject malformed concurrency entries RuntimeConcurrencyBenchmark.batchSizes(parsing:) refuses the whole list on an empty, non-numeric or out-of-range entry; benchmarkModeConflict uses it 9ed988a4b
Validate terminal events rowFailure: length exactly at the quota, stop on a configured stop token within it, full quota in stagger mode; failures exit 2 9ed988a4b
Recheck the model hash after loading Shared RuntimeGenerationBenchmark.loadVerifiedTarget re-hashes after the load; the new mode uses it 64ec98877, 9ed988a4b
Record per-run workload provenance Model hash, prompt hash and render date; per-cell backend, KV precisions, MTP state and assistant identity; per-row prompt-token hash and quota 9ed988a4b
Refuse cells below the requested width effectiveMaxConcurrentRequests != B is listed in refusedCells before warmup; exit 2 9ed988a4b, e95d68876
Drain each event stream immediately runBatch starts each row's drain as soon as its submit returns 9ed988a4b
Prevent the stagger floor from flattening rows No 3-token floor; rowMaxTokens refuses --max-tokens below 3×B before any filesystem or GPU work 9ed988a4b
Propagate native teardown failures shutdownReportingCompletion() per cell; retirement failure propagates and keeps the container 9ed988a4b

f0f8a87f4 documents the size range, malformed-list refusal, 3×B rule, refusedCells, provenance fields and exit-2 conditions, and adds the bullet for the benchmark mode to the changelog. e95d68876 is the independent refactor pass (below). A Codex finding posted after that push (warmup terminals) is deferred; see Follow-ups.

Follow-ups

Deferred, not blocking this PR:

  • No unit tests for two branches of RuntimeConcurrencyBenchmark.run: the effective-width refusal and GLM5 Next retirement-failure propagation. Both need a live EngineV2BenchmarkSession. The JSON encoding of refusedCells is tested.
  • Rollback switches on fleet providers. DARKBLOOM_TTFT_QWEN_MTP_CHAINED and DARKBLOOM_TTFT_QWEN_MTP_CARRY are not forwarded to the LaunchAgent, so fleet providers can only roll back with a new build (perf(native): fused causal SDPA for full-attention prompt chunks #1540 set the same precedent). Forwarding them means adding them to LaunchAgent.inferencePassthroughEnvKeys, its doc comment, the passthrough section of docs/provider/cli-reference.md and the configuration rows. Decide this before the next provider release, along with a possible rename to DARKBLOOM_QWEN_MTP_CHAINED_DECODE / DARKBLOOM_QWEN_MTP_PREFILL_CARRY. Renaming after a release breaks operator configs, and sibling TTFT PRs share the prefix, so it is a program-wide decision.
  • Warmup terminals are not validated (Codex thread on e95d68876). measure discards the warmup rows, so a warmup row that ends with error, cancelled, no terminal or a short length is not reported. Measured rows are still checked by rowFailure, so what is lost is only the guarantee that the measured batch ran on a fully warmed slot. Fix: run the warmup rows through rowFailure (quota warmupMaxTokens) and refuse the cell before the measured batch, with a scripted-submit test.
  • Re-measuring on master's SDK pin, and with the revised benchmark (Measured effect, above).

Validation

This round, in the PR worktree on an M3 Ultra (Mac15,14). Daemon state was isolated the way scripts/run-provider-tests.sh does it (DARKBLOOM_STATE_FILE and DARKBLOOM_LOADED_MODELS_FILE in a mktemp directory). Full CI runs on the pushed head e95d68876.

Command Outcome
cd provider-swift && swift build --build-tests -j 8 Build complete at f0f8a87f4 and again at e95d68876
swift test --skip-build --no-parallel --filter 'DarkbloomCLITests|BenchmarkEntryPointRefusalTests|BenchmarkProductionInputTests|BenchmarkSessionDonationDemandTests|ThroughputSweepTests|ThroughputSweepDecodeTimingTests|ModelBenchmarkDispatchTests|RuntimeConcurrencyBenchmarkTests|RuntimeGenerationBenchmarkTests|EngineV2KVQuantizationPolicy|EngineV2DiffusionPrefixPrecision' at f0f8a87f4, metallib staged with scripts/stage-test-metallib.sh Passed: 82 tests in 15 suites (ProviderCoreTests), plus the whole DarkbloomCLITests target, 595 tests in 92 suites
swift test --skip-build --no-parallel --filter 'RuntimeConcurrencyBenchmarkTests|RuntimeGenerationBenchmarkTests|BenchmarkRuntimeGenerationOptionsTests|BenchmarkEntryPointRefusalTests|ThroughputSweepTests|ModelBenchmarkDispatchTests' at e95d68876 Passed: 51 tests in 10 suites (ProviderCoreTests, including all 8 RuntimeConcurrencyBenchmarkTests), plus 2 tests in 1 suite (DarkbloomCLITests)
Mutation check: submit-all-then-drain restored in runBatch eachRowIsDrainedWhileLaterRowsAreStillSubmitting failed as expected (timed out waiting for row 0 to be pulled)
Mutation check: upper-middle median and the max(3, ...) stagger floor restored RuntimeConcurrencyBenchmarkTests failed as expected: 3 tests, 5 issues
git merge-tree --write-tree of the merge 77564d715's parents Same tree as the commit: a clean auto-merge with no hand-made resolutions; gitlinks equal master
./scripts/docs-check.sh 190 file(s) OK
python3 scripts/docs-impact-check.py --base origin/master 11 changed file(s), canonical documentation coverage OK
python3 scripts/changelog.py check and preview 45 valid fragment(s); the entry renders
mmdc on both figures Both parse and render
git log --show-signature on every new commit All signed (ED25519)

Not run this round: a real-model run of the revised benchmark mode, make provider-test (the full provider suite; CI runs it), a release build, and new rate measurements.

Earlier validation (before the rebase; it covered the SDK pins this PR no longer moves)
  • swift build --product darkbloom and swift build --build-tests completed with the then-proposed pins (libs/mlx-swift 81f58d79, libs/mlx-swift-lm 6af40831, later 3fd6d07e). BenchmarkRuntimeGenerationOptionsTests passed (2 tests).
  • Real-model smoke: darkbloom benchmark --runtime-generation --runtime-mtp --runtime-concurrency 1,2,4 --model Qwen3.5-9B --max-tokens 64, debug build, with and without both switches. Tokens were identical at B = 1, 2 and 4; 63 chained steps (measured batch) and 0 seed rows at B = 2 and 4 (switches off: 0 chained, 188 and 376 seed rows, counted over the warmup and measured batches); every row finished by length. The refactor-pass rerun at 5a648b911 reproduced the tokens and counters.
  • SDK tests: see the SDK PR. Its tests and the join test passed; the 8 load-induced collector timeouts passed in a serialized rerun, and 3 tolerance cases in code the change does not run still failed.

Limitations

Refactor pass

Two independent refactor passes ran.

This round: an independent reviewer checked the master merge, the shared loader and every fix against the SDK at 889fe3cc. It found no blocking defects and made one behavior-preserving cleanup commit, e95d68876:

  • run() reads session.effectiveMaxConcurrentRequests once.
  • docs/provider/cli-reference.md cites rowFailure with its actual source file, RuntimeConcurrencyBenchmarkReport.swift, and qualifies RuntimeConcurrencyBenchmark.rowMaxTokens.
  • The changelog bullet states the actual stagger rule (--max-tokens below 3×B is refused, even when the quotas would differ, such as 8, 6, 4, 2 at B = 4). It also lists a stop without a configured stop token among the exit-2 conditions.

Before the rebase: 5a648b911 (pin and docs wording, report field comments; summarized in its commit message). Its "for follow-up" items were the duplicated setup without a post-load re-hash and the silently filtered size list. Both are fixed in this round (64ec98877, 9ed988a4b). The switch-name question is still open (Follow-ups).

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Gajesh2007 and others added 3 commits October 21, 2026 17:11
…time benchmark

Pins libs/mlx-swift-lm to the ttft/qwen-mtp-decode commits on SDK main:
while the inline Qwen MTP head cannot speculate (more than one decode
row), its rows run ordinary chained decode that feeds the head history
at finalize, with no policy top-two or extra readback, and the final
prompt row seeds the first carry so a round can follow the first token
without a seed step. Rollbacks: DARKBLOOM_TTFT_QWEN_MTP_CHAINED=0 and
DARKBLOOM_TTFT_QWEN_MTP_CARRY=0.

SDK main needs libs/mlx-swift 81f58d79 (GPU.CommandBufferLimits); its
nested MLX is 71271f08, and libs/mlx moves to the same commit.

`darkbloom benchmark --runtime-generation [--runtime-mtp]
--runtime-concurrency 1,2,4,8` drives distinct greedy rows through one
production slot per batch size (the artifact's MTP policy, prefix caches
off), warmed by an identical batch, and reports per-row tokens, first and
third token times, decode rates, the all-rows decode window, chained steps
and MTP metrics as JSON. CBV2_STEP_PROFILE=1 adds a per-batch phase table
on stderr.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ncurrency

`--runtime-stagger` stops row i of a B-row batch after
max-tokens*(B-i)/B tokens (at least 3), so the decode cohort shrinks to
one row and the report shows speculation resuming as concurrency drops.
Each row now also reports `earlyTokenMs`, the submit-to-arrival times of
its first eight tokens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…enchmark report

Pins libs/mlx-swift-lm to 3fd6d07e: 22896c7e shares one recurrent
hidden-returning forward between seed steps and ordinary-history decode
and moves the new Qwen3.5 engine suite to Integration/Engine (no
behavior change), and 3fd6d07e adds a test for a row joining while
another row speculates.

The concurrency benchmark now documents that each cell's MTP metrics
include the warmup batch, while chained steps count the measured batch
only. The CLI reference lists the first-eight token times and the
three-token stagger floor. The configuration rows cite the full path.
The inference paragraph names the rollback switches and links their
reference, as docs/AGENTS.md asks, and the changelog says LaunchAgents
do not forward the switches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
d-inference Ready Ready Preview Oct 22, 2026 7:52am UTC
d-inference-console-ui-dev Ready Ready Preview Oct 22, 2026 7:52am UTC
d-inference-landing Ready Ready Preview Oct 22, 2026 7:52am UTC
darkbloom-status Ready Ready Preview Oct 22, 2026 7:52am UTC
eigen-homepages-darkbloom Ready Ready Preview Oct 22, 2026 7:52am UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T07:58:34.660522Z e95d688 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Threat model review — advisory

Reviewed head e95d688766bf against base 8f695868950d.

Review not completed for this head. Previous findings are superseded, not confirmed resolved.
Bedrock request allowance reached; no fallback around the limit

Reviewers: anthropic/claude-sonnet-5.5: first pass completed

Models: budgeted Sonnet / selective Opus / selective Sol 6.1. Findings require human validation; this review never requests changes or blocks merging.

Failure diagnostics: BEDROCK_CALL_LIMIT

Coverage: 66/66 source units; cross-file integration complete. 8 selected depth batch(es) pending. All threat definitions indexed; relevant full definitions selected. Unchanged callers are not scanned.

Cost this run: $0.0000 reported, $0.0000 reserved with unknown cost; 0 paid request(s), 0 reused batch(es), 0 provider cache-hit tokens.

Saved findings and earlier report · Historical findings are not confirmed resolved.

Bedrock: 30 request(s), 1446716 uncached + 0 cache-read + 0 cache-write input / 19940 output tokens; 0 request(s) with unknown usage. OpenRouter backup used 0 time(s). Dollar amounts above cover OpenRouter only; AWS billing is reconciled separately.

Refresh before review: master moved (Nemotron Super and SDK pin updates; it now
pins SDK 0351444e, mlx-swift 67dc7528 and MLX ad4745a2). Keep master's mlx-swift
and MLX pins and pin libs/mlx-swift-lm to c66869ea (the paired SDK PR head).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e6af07bc3d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Gajesh2007 and others added 2 commits October 21, 2026 17:51
Refresh before review: master moved (Nemotron Super and SDK pin updates; it now
pins SDK 889fe3cc, mlx-swift 67dc7528 and MLX ad4745a2). Keep master's mlx-swift
and MLX pins and pin libs/mlx-swift-lm to c66869ea (the paired SDK PR head).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Layr-Labs/mlx-swift-lm#330 squash-merged as fa63c27, and d-inference master
already pins SDK main 889fe3cc, which contains it (and #322). Pin that commit
instead of the PR branch head, so this PR no longer moves the SDK pin and
carries only its provider-side changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2249321d0e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Gajesh2007 and others added 5 commits October 21, 2026 22:12
…nchmarks

Move RuntimeGenerationBenchmark's model-type refusal, Metal check, pre- and
post-load weight hash, container load, tokenizer handle, prompt rendering,
prefix-cache-off environment and SHA-256 hex into loadVerifiedTarget,
preparedPrompt, prefixCacheDisabledEnvironment and sha256Hex so the
runtime-concurrency mode can use the same verified load. A post-load hash
mismatch still releases the container and throws modelHashMismatch.
Behavior of the runtime-generation report is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Address the review findings in the opt-in --runtime-concurrency mode:

- Parse batch sizes with RuntimeConcurrencyBenchmark.batchSizes: an empty,
  non-numeric or out-of-range entry refuses the whole list (the CLI reports
  it before any model work) instead of being dropped.
- Staggered quotas are maxTokens*(B-i)/B without a floor; rowMaxTokens
  refuses maxTokens < 3B, so quotas stay distinct and at least 3 rather
  than collapsing onto a shared 3-token floor.
- Load through loadVerifiedTarget, which rehashes the weights after the
  container load before any session is built.
- Refuse a cell whose session.effectiveMaxConcurrentRequests differs from
  its batch size before warmup; it is listed in refusedCells.
- Validate each row's terminal (rowFailure): length exactly at its quota,
  or a configured stop token within it, and in stagger mode the full
  quota. Failures and refused cells make the run unsuccessful (exit 2).
- Use the two-sided median for medianRowDecodeTokensPerSecond.
- Start draining each row's stream as soon as its submit returns, so
  arrivals are not timed after the remaining submissions.
- Record the verified model hash, prompt hash, render date and per-row
  prompt-token hashes, plus per-cell backend, KV precisions, MTP state
  and assistant identity.
- Tear each cell down with shutdownReportingCompletion and propagate a
  native retirement failure (keeping the container) instead of the
  error-swallowing shutdown(); a measurement error still takes priority.

The pure helpers and the report summary move to
RuntimeConcurrencyBenchmarkReport.swift with unit tests, including a
scripted submit that only returns once the previous row is being drained.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cli-reference documents the 1-64 size range and malformed-list refusal,
the 3xB stagger requirement, refusedCells, the provenance fields and the
exit-2 conditions; test.md's focused filter now includes the new suite.
The changelog fragment gains the benchmark mode entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Behavior-preserving cleanup from the independent refactor pass:

- Read the slot's effective width once when deciding whether a cell is
  measured or refused.
- cli-reference cites rowFailure with its source file
  (RuntimeConcurrencyBenchmarkReport.swift) and qualifies rowMaxTokens.
- The changelog entry states the actual stagger refusal (--max-tokens
  below 3xB, not only equal quotas) and lists a stop without a configured
  stop token among the exit-2 conditions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e95d688766

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Gajesh2007
Gajesh2007 merged commit 5f373db into master Oct 22, 2026
93 checks passed

This branch was successfully deployed

5 active deployments
Preview – d-inference-console-ui-dev — e95d6887 Deployed Oct 22, 2026 by vercel[bot]
Preview – d-inference-landing — e95d6887 Deployed Oct 22, 2026 by vercel[bot]
Preview – d-inference — e95d6887 Deployed Oct 22, 2026 by vercel[bot]
Preview – eigen-homepages-darkbloom — e95d6887 Deployed Oct 22, 2026 by vercel[bot]
Preview – darkbloom-status — e95d6887 Deployed Oct 22, 2026 by vercel[bot]
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.

2 participants