Skip to content

paper: restructure sections for cleaner information flow - #332

Merged
Gajesh2007 merged 2 commits into
docs-refreshfrom
paper-flow-fix
Jun 14, 2026
Merged

Gajesh2007 merged 2 commits into
docs-refreshfrom
paper-flow-fix

Conversation

@Gajesh2007

@Gajesh2007 Gajesh2007 commented Jun 13, 2026 •

Copy link
Copy Markdown
Member

Restructures the LaTeX paper so each section builds on the previous one, instead of reading like a stack of appended subsystems.

Changes:

  • Related Work now includes the Apple PCC comparison as a subsection.
  • End-to-End Encryption moves immediately after System Architecture.
  • Consumer-Selectable Trust Tiers and Provider Scoring/Routing merge into Trust Tiers and Routing Policy.
  • Provider Verification Requirements moves into the routing section.
  • Removed redundant Cryptographic Guarantees and SE Key Binding Protocol subsections.
  • Formal Security Analysis follows routing; Hypervisor Memory Isolation follows formal analysis.

Result: compiles cleanly, no undefined references, page count drops from 18 to 17. Layers on top of #329 (docs-refresh).


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

- Move Apple PCC comparison into Related Work as a subsection.
- Place End-to-End Encryption immediately after System Architecture.
- Merge Consumer-Selectable Trust Tiers and Provider Scoring/Routing into
  a single 'Trust Tiers and Routing Policy' section.
- Move Provider Verification Requirements into the new routing section.
- Remove redundant Cryptographic Guarantees and SE Key Binding Protocol
  subsections (already covered in attestation architecture).
- Place Formal Security Analysis after routing, so it references all
  previously-described mechanisms.
- Place Hypervisor Memory Isolation after formal analysis as future hardening.
- Recompile PDF; paper shrinks from 18 to 17 pages.
@vercel

vercel Bot commented Jun 13, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
d-inference Ready Ready Preview Jun 13, 2026 8:48pm
d-inference-console-ui-dev Ready Ready Preview Jun 13, 2026 8:48pm
d-inference-landing Ready Ready Preview Jun 13, 2026 8:48pm

Request Review

@ethenotethan ethenotethan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated Code Review — Layr-Labs/d-inference#

Verdict: COMMENT

Security — ✅ No issues found

Performance — ✅ No issues found

Type_diligence — ✅ No issues found

Additive_complexity — ✅ No issues found

✅ All four passes clean. No issues found.

🤖 Automated review by Centaur · DAR-186

Update title, headers, abstract, and body narrative to use 'distributed'
instead of 'decentralized'. External bibliography titles (Akash, Ritual)
left unchanged because they are proper names of other projects.

@ethenotethan ethenotethan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated Code Review — Layr-Labs/d-inference#

Verdict: COMMENT

Security — ✅ No issues found

Performance — ✅ No issues found

Type_diligence — ✅ No issues found

Additive_complexity — ✅ No issues found

✅ All four passes clean. No issues found.

🤖 Automated review by Centaur · DAR-186

@blacksmith-sh

blacksmith-sh Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Found 1 test failure on Blacksmith runners:

Failure

Test View Logs
github.com/eigeninference/d-inference/e2e/TestIntegration_ConcurrentRequests View Logs

Fix with Codesmith
Need help on this PR? Tag /codesmith with what you need.

@Gajesh2007
Gajesh2007 merged commit 89d0fb9 into docs-refresh Jun 14, 2026
8 of 10 checks passed
Gajesh2007 added a commit that referenced this pull request Jun 14, 2026
#329)

* docs: modular refresh with code-accurate privacy and architecture docs

- Reorganize docs into consumer/, provider/, developer/, architecture/,
  operations/, and reference/ directories.
- Replace monolithic ARCHITECTURE.md with component-based, concern-based docs.
- Correct privacy model: coordinator decrypts in CVM memory for routing/billing
  but does not log/retain prompt content; provider is decryption endpoint.
- Update billing (0% platform fee), routing (cost scheduler), and provider
  memory/CLI facts from current code.
- Move design docs and runbooks into architecture/decisions/ and operations/.
- Add docs/AGENTS.md with authoring rules and canonical code paths.

* docs: add Mermaid diagrams and sync paper with code-accurate model

- Add rendered SVG diagrams for system architecture, request data flow,
  encryption layers, attestation stack, enrollment flow, and routing flow.
- Embed diagrams in architecture/ and operations/ docs; remove redundant
  ASCII diagrams and trim duplicate narrative.
- Update LaTeX paper to match the refreshed docs: Swift provider,
  hop-by-hop encryption, APNs code-identity attestation, MDA-over-MDM as
  the active hardware path, and cost-based routing. Regenerate PDF.

* docs/paper: strengthen APNs code-identity mapping

- Frame APNs code-identity attestation as a macOS-compatible replacement
  for App Attest, which is unavailable on macOS.
- Explain that AppleMobileFileIntegrity.kext (AMFI) enforces the signed
  App ID / aps-environment entitlement at launch, preventing modified or
  re-signed binaries from receiving our push topic.
- Add MDM caveat: APNs proves binary identity but not device security
  posture; MDM/MDA remain required for SIP/SecureBoot/hardware proof.
- Update architecture/decisions/apns-code-attestation.md with the AMFI
  kernel extension detail.
- Regenerate paper PDF (18 pages, compiles cleanly).

* docs/paper: add APNs code-identity diagram and AMFI mapping

- Add dedicated Mermaid diagram for APNs code-identity attestation showing:
  - App Attest unavailable on macOS
  - AppleMobileFileIntegrity.kext (AMFI) enforcing code signature, App ID,
    and aps-environment entitlement at launch
  - Encrypted nonce push + SE signature verification flow
  - MDM + MDA caveat for SIP/SecureBoot/hardware provenance
- Render diagram to SVG and PNG; embed in architecture/security/attestation.md
  and architecture/decisions/apns-code-attestation.md.
- Add the PNG figure to the LaTeX paper in the Layer 5 APNs section.
- Regenerate paper PDF (18 pages, compiles cleanly).

* paper: restructure sections for cleaner information flow (#332)

* paper: restructure sections for cleaner information flow

- Move Apple PCC comparison into Related Work as a subsection.
- Place End-to-End Encryption immediately after System Architecture.
- Merge Consumer-Selectable Trust Tiers and Provider Scoring/Routing into
  a single 'Trust Tiers and Routing Policy' section.
- Move Provider Verification Requirements into the new routing section.
- Remove redundant Cryptographic Guarantees and SE Key Binding Protocol
  subsections (already covered in attestation architecture).
- Place Formal Security Analysis after routing, so it references all
  previously-described mechanisms.
- Place Hypervisor Memory Isolation after formal analysis as future hardening.
- Recompile PDF; paper shrinks from 18 to 17 pages.

* paper: rename Decentralized → Distributed

Update title, headers, abstract, and body narrative to use 'distributed'
instead of 'decentralized'. External bibliography titles (Akash, Ritual)
left unchanged because they are proper names of other projects.
Gajesh2007 added a commit that referenced this pull request Oct 22, 2026
Layr-Labs/mlx-swift-lm#332 squash-merged as 118ffb0a ("Stream auto tool calls as OpenAI tool_calls fragments and find end tags in appended text (#332)").
Move the gitlink from the PR branch head 756432c8 to that commit on SDK main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gajesh2007 added a commit that referenced this pull request Oct 22, 2026
f77b384c is SDK main: 118ffb0a (#332) plus #331 (an opt-in plain-chunk
ceiling for bidirectional media requests, CBv2Contracts and
SchedulerV2) and #333, which fixes the MLXLMServerTests build after the
OpenAIToolCallDelta change. With 118ffb0a the SDK test targets did not
compile, so the Provider SDK Tests lane failed. #331 is opt-in and the
provider does not enable it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gajesh2007 added a commit that referenced this pull request Oct 22, 2026
The previous pin, c8dce97d (#331), also carries SDK #332: chunk deltas now
carry [OpenAIToolCallDelta] and MLXServerGenerationEvent gains
.toolCallDelta, so ProviderLoop+SSEParser.swift no longer compiled. Pin
f77b384c, the merged SDK main commit that adds #333's MLXLMServerTests
build fix on top of #331 (same library tree).

The SSE parser and the six test-file hunks are copied byte for byte from
#1549 (ttft/stream-auto-tool-calls), so whichever of the two lands second
merges cleanly. They change types only; this branch does not request
streamed fragments, so complete calls hash and encode as before.

Flint response-format code added by master's #1552 also switches over
MLXServerGenerationEvent; it ignores .toolCallDelta like .toolCall, and
its tests count a completed delta as a call.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gajesh2007 added a commit that referenced this pull request Oct 22, 2026
…plain Qwen prompt tails (#1549)

* Stream auto tool calls and seed content for plain Qwen prompt tails

Provider TTFT is measured to the first content-bearing frame, and tool
calls were released only after the engine terminal. A response that
began with a tool call (Gemma 4 with thinking off, Qwen without
thinking, Qwen3-VL) therefore reported prefill plus the whole call
decode, and the frame loop's pre-content deadline could discard a fully
generated call.

For tool_choice auto, chat streams now pass calls through as OpenAI
tool_calls fragments while they are generated (Gemma, Qwen 3.5, Harmony
and framed-JSON formats). NativeToolStreamRouter admits
parallel_tool_calls cardinality at a call's first fragment and validates
the declared name and schema when its frame closes; a call cut off by
max_tokens ends with finish_reason length. Required and named tool
choices, native-channel families and other formats keep
validate-then-expose at the engine terminal. The response hash adds one
marker per fragment (a complete call hashes as before), and the
cancelled-stream billing floor counts only delivered text.

ReasoningPromptProbe also starts Qwen-family streams in content state
when the rendered prompt tail carries no think marker (Qwen3-VL
Instruct); the undecided think parser otherwise buffered the whole
answer until end of generation. The local Qwen 3.5, 3.6 and 3.8
templates already end in a marker and are unchanged.

Bumps libs/mlx-swift-lm to 9496f677 (the pinned SDK 19634dd8 plus a
format-only commit and the streamed tool-call fragments).

Rollbacks, both forwarded to the LaunchAgent:
DARKBLOOM_TTFT_STREAM_TOOL_CALLS=0, DARKBLOOM_TTFT_THINK_CONTENT_SEED=0.

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

* Stream only Gemma marker strings early and scan end tags linearly

Bumps libs/mlx-swift-lm to 9d8bfc89:

- A Gemma frame that leaves the strict grammar anywhere is read by the
  complete parser's fallback, which turns bare scalars and Gemma-syntax
  composites into raw strings. Typed members a streamed call had already
  exposed then disagreed with the parse, and a valid call failed as a
  tool_choice violation. Gemma now streams only marker strings; other
  values arrive with the closing frame. A seeded differential test over
  template-rendered calls in token-like chunks found it.
- Every format except Qwen 3.5, MiMo and strict Gemma searched the whole
  growing buffer for its end tags on every chunk. Gemma, Harmony and
  framed-JSON calls cost CPU time quadratic in their length (1.2 ms per
  chunk at 64 KB, about 20 s for one 64 KB Gemma file write); they now
  cost 1-3 us per chunk at every size (2-6 us when streamed).

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

* Test a streamed Gemma call that leaves the strict grammar

A typed Gemma value followed by one that drops its string markers makes
the complete parse read every value as a raw string. Before Gemma
streamed only marker strings, the router exposed the typed value first
and then refused the valid call as diverged; it now completes with the
parse's arguments.

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

* Document streamed tool_calls fragments in inference_response_chunk

The inference_response_chunk envelope is unchanged, but the chat chunk
it carries now splits a streamed auto tool call across several
tool_calls entries that share one index: id, type and function.name
first, then function.arguments fragments. The coordinator parses these
chunks, so the protocol reference states the shape and links the
mechanism; the platform keeps a mirror of this page.

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

* Pin the SDK streamer cleanup and correct tool-stream comments

Moves libs/mlx-swift-lm to 4fceb806, a behavior-preserving SDK commit
that drops dead state from the streamed tool-call renderers.

- ToolStreamPreparation.exposesCallsWhileGenerated is private; only
  makeHandler uses it. The streamingOptions comment now says what
  happens to a call that is not exposed: it is validated before it is
  shown, unless the parser rejects the frame and returns it as text.
- The ReasoningPromptProbe comment no longer says that every
  unrecognized prompt tail keeps its old behavior; plain Qwen tails are
  the documented exception.
- The changelog fragment names the 64 KB example as a Gemma call and
  gives its logged cost with this change (about 0.1 s streamed).

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

* Re-pin libs/mlx-swift-lm to the merged SDK change (#332)

Layr-Labs/mlx-swift-lm#332 squash-merged as 118ffb0a ("Stream auto tool calls as OpenAI tool_calls fragments and find end tags in appended text (#332)").
Move the gitlink from the PR branch head 756432c8 to that commit on SDK main.

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

* Re-pin libs/mlx-swift-lm to SDK main f77b384c (#333)

f77b384c is SDK main: 118ffb0a (#332) plus #331 (an opt-in plain-chunk
ceiling for bidirectional media requests, CBv2Contracts and
SchedulerV2) and #333, which fixes the MLXLMServerTests build after the
OpenAIToolCallDelta change. With 118ffb0a the SDK test targets did not
compile, so the Provider SDK Tests lane failed. #331 is opt-in and the
provider does not enable it.

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

* Seed content for plain prompt tails only on Qwen3-VL

The plain-tail content seed matched every qwen* model type. A
close-only reasoner such as qwen3_next writes its reasoning before a
bare </think>, so after a plain prompt tail the seed exposed that
reasoning as answer content (plainPromptTailDoesNotInject failed).

Seed only qwen3_vl_moe: Qwen3-VL Instruct renders a bare
"<|im_start|>assistant\n" and never reasons, and Qwen3-VL Thinking
opens <think> in the prompt, which the tail check handles first. Qwen
3.5, 3.6 and 3.8 templates always end in a marker, so they keep the
tail-derived prefix and an unmarked tail stays undecided.

Tests: the probe table moves to ReasoningPromptProbeTests and covers
qwen3_vl_moe (plain and think tails) against close-only and other
types; production wiring tests cover a plain qwen3_vl_moe tail and
plain qwen3_5/qwen3_5_moe tails. Reverting the scope check fails 3
tests (8 issues).

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

* End a streamed call cut off by max_tokens with length, even if diverged

finishToolCalls dropped only .callFailed(.unterminated) when the engine
stopped at the token limit. Gemma's lenient EOS parse slices from the
first "{" to the last "}", so a truncated frame whose partial arguments
contain a "}" (common in written code) parses to a garbled call, the
SDK reports .callFailed(.diverged), and the stream ended in a
tool_choice violation instead of the documented finish_reason length.

At the token limit every EOS failure of the open exposed call is now
truncation. A frame that ends without the limit still fails.

Regression test: truncatedCallEndsQuietlyOnlyAtTheTokenLimit gains a
partial with a "}" inside the open string; it fails without the fix
with toolChoiceViolation("streamed tool call output was diverged").

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

* Describe the Qwen3-VL-only plain-tail seed and restamp changed docs

inference.md had two contradictory statements about prompt tails with
no think marker: a garbled sentence after the new seed paragraph and
the original "unrecognized prompt tails receive no prefix" sentence.
Replace both with one paragraph that matches the narrowed seed
(qwen3_vl_moe only, why other Qwen types are excluded, the kill switch)
followed by the remaining no-prefix cases.

The DARKBLOOM_TTFT_THINK_CONTENT_SEED configuration row and the
changelog fragment now name Qwen3-VL instead of every Qwen-family
stream. protocol-messages.md gained the streamed tool_calls paragraph
on 2026-10-22 UTC but kept its 2026-10-21 stamp; restamp it.

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

* Tighten plain-tail seed and truncation wording; count completed Flint calls

Review cleanup with no behavior change:

- The DARKBLOOM_TTFT_THINK_CONTENT_SEED comment now names the
  plainTailContentModelTypes scope instead of every unmarked prompt.
- inference.md says "request" for the Qwen3-VL seed, because the probe
  also seeds collected requests. The max_tokens row of the streamed-call
  table now states that a partial frame whose end-of-generation parse
  fails or diverges still ends with finish_reason length, matching
  NativeToolStreamRouter.finishToolCalls.
- The Flint response_format output collector counts a .toolCallDelta
  only when it completes a call, like the Flint answer-stop collector,
  so argument fragments are never counted as separate calls.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Gajesh2007 added a commit that referenced this pull request Oct 22, 2026
* Raise CBv2 mixed-step prefill geometry for GPT-OSS, dense Qwen and Gemma 4

With one partial prefill a busy engine prefills only its plain chunk beside
decode rows, so production fed every mixed step 512 prompt tokens. GPT-OSS,
dense Qwen3.5/3.8 and Gemma 4 now default to a 2,048-token plain chunk and
a 4,096-token step budget (EngineV2Factory.prefillGeometry). The chunk
replaces the 2,048-token GPT-OSS and Gemma stripes and stays below dense
Qwen's 4,096-token stripe, so paged ring sizes, KV charges and load
quotations are unchanged. Other families keep 512 / 2,048.

Gemma 4 image and video requests keep 512-token chunks through the SDK's
new bidirectionalMediaPrefillChunkCeiling (libs/mlx-swift-lm moves to the
commit that adds it): a paged span-bearing chunk attends in one unblocked
call, so its score tensor grows with the chunk length times the history.

DARKBLOOM_CBV2_PREFILL_CHUNK and DARKBLOOM_CBV2_STEP_TOKENS override the
geometry for every family and reach the launchd provider job; 512 / 2048
rolls back. Scheduler-prefill receipts record the geometry (schema 5), the
decision live runner pins its simulated geometry, and fixtures that pin a
stripe also pin the SDK chunk. Docs, a dated measurement report and a
changelog fragment record the load, inter-token latency and activation
evidence and its limits.

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

* Document the Gemma 4 block ring bound and tighten geometry comments

Behavior-preserving refactor-pass follow-up to the prompt geometry change.

- inference.md invariant 9: a Gemma 4 block chunk stays within the
  2,048-token ring because Gemma4Processor delimits every image and video
  frame, not because submit validation bounds blocks, which now admits them
  up to the 4,096-token step.
- configuration.md: a solo stripe that does not exceed the plain chunk,
  including an equal one, is disabled.
- productionSchedulerConfig: the media ceiling comment names bidirectional
  media, which is all the ceiling applies to.
- SegmentedFleetGeometry: window rings follow the largest schedulable
  chunk, which for GPT-OSS and Gemma is now the plain chunk, not a stripe.
- libs/mlx-swift-lm moves to the SDK commit that files the ceiling tests
  under Unit/Scheduling, matching SDK main; no library change.

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

* Record why the Gemma benchmark wrapper schema stays at 6

Raw scheduler-prefill schema 5 adds the plain chunk and step budget. Like the
raw sweep 8 / arrival 6 note, say why the wrapper schema does not move: the
default workload's prompts each fit one chunk and no step exceeds 2,048
tokens, so the Gemma 4 geometry change does not alter its chunking; longer
prompts beside decode rows do not compare across the change. Comment only.

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

* docs: untangle the recurrent-bank paragraph after the master merge

The merge kept both sides of the conflicting prefix-cache.md paragraph, which
repeated two sentences. Keep this branch's 2,048-token plain chunk and master's
Nemotron Super alignment sentence once each.

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

* Re-pin libs/mlx-swift-lm to the merged SDK change (#331)

Layr-Labs/mlx-swift-lm#331 squash-merged as c8dce97d ("Add an opt-in plain-chunk ceiling for bidirectional media requests (#331)").
Move the gitlink from the PR branch head 204771c4 to that commit on SDK main.

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

* Re-pin the SDK to f77b384c and adapt to its tool-call delta type

The previous pin, c8dce97d (#331), also carries SDK #332: chunk deltas now
carry [OpenAIToolCallDelta] and MLXServerGenerationEvent gains
.toolCallDelta, so ProviderLoop+SSEParser.swift no longer compiled. Pin
f77b384c, the merged SDK main commit that adds #333's MLXLMServerTests
build fix on top of #331 (same library tree).

The SSE parser and the six test-file hunks are copied byte for byte from
#1549 (ttft/stream-auto-tool-calls), so whichever of the two lands second
merges cleanly. They change types only; this branch does not request
streamed fragments, so complete calls hash and encode as before.

Flint response-format code added by master's #1552 also switches over
MLXServerGenerationEvent; it ignores .toolCallDelta like .toolCall, and
its tests count a completed delta as a call.

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

* Fill the schema-5 geometry in the merged prompt-mode receipt test

Master's #1535 added SchedulerPrefillPromptTests against schema 4. After
the merge its receipt fixture omitted this branch's new required
prefillChunkTokens and maxBatchedTokensPerStep and expected schema 4 from a
current-version report, so the test target failed to compile. The fixture
now records the SDK geometry and expects the current schema; the legacy
case decodes a faithful schema-4 payload without the geometry fields.

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

* Carry the schema-5 prompt geometry into gptoss_profile summaries

summarize_cell copied only soloPrefillStripeTokens from a scheduler-prefill
receipt. Under the wide plain chunk a nil stripe no longer means 512-token
chunks, so derived summaries could not tell a default run from an explicit
chunk or step-budget arm. Prefill rows now also keep prefillChunkTokens and
maxBatchedTokensPerStep (None for schema-4 receipts, which lack them).

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

* Keep the wide prompt geometry default for Gemma 4 only

The PR's own KV-subtracted activation probe at eight rows of 32,768-token
prompts, inside the floors' measurement range of eight rows at 4k tokens or
more, shows 2,048 / 4,096 pushing GPT-OSS from its 3.5 GiB floor to 3.62 GiB
and Qwen3.5-9B from 5.73 to 6.03 GiB against the 5.5 GiB default. No margin
absorbs that: UnifiedMemoryCap.liveKVHeadroomBytes grants KV until MLX usage
plus the reserve reaches the cap, so activation above the reserve lands past
the cap once the KV budget is full. Floors are measured constants that move
only with platform admission, so they stay unchanged here.

usesWidePrefillChunk now selects Gemma 4 alone (3.73 GiB at 32k against
5.5). GPT-OSS and dense Qwen3.5/3.8, including the unmeasured Qwen3.8-27B,
keep 512 / 2,048 and their stripes; DARKBLOOM_CBV2_PREFILL_CHUNK=2048 with
DARKBLOOM_CBV2_STEP_TOKENS=4096 still opts them in for measurement.

Tests pin GPT-OSS and dense Qwen to the SDK geometry and drive the GPT-OSS
busy-engine and pool-lockstep cases through the opt-in. The GPT-OSS and
Qwen live checkpoint fixtures no longer need to pin the SDK geometry and
return to master's form; prefix-cache.md returns to master because no
recurrent family takes the wide chunk by default. The report gains a
default-scope section with the per-cell margins and names the SDK revision
the probes ran on (cef662176, before SDK #326's GPT-OSS bf16 activations).

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

* Raise undersized Gemma 4 chunk overrides to cover a whole media block

A Gemma 4 chunk that starts at a bidirectional media block extends over
the whole block, and submit validation bounds blocks only by the step
budget, but the paged window rings hold max(chunk, stripe) tokens. With
DARKBLOOM_CBV2_PREFILL_CHUNK=256 and DARKBLOOM_CBV2_SOLO_PREFILL_STRIPE=0
the rings held 256 tokens and a 280-token image block tripped the
PagedSequenceKV precondition, killing the provider.

prefillGeometry now raises a Gemma 4 chunk to 1,120 tokens, the vision
family's largest image budget, whenever the override leaves
max(chunk, stripe) below it. The default 2,048-token chunk, the documented
512 / 2,048 rollback (its 2,048-token stripe re-arms) and other families
are unchanged.

A geometry test pins the raised values; an engine test prefills a
300-token block beside decode under chunk 256 with the stripe off. With
the guard disabled the first fails and the second stops on "windowed
update of 300 tokens exceeds maxPrefillChunk 256".

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

* Record the prompt geometry the built engines actually ran in receipts

The scheduler-prefill receipt took prefillChunkTokens,
maxBatchedTokensPerStep and soloPrefillStripeTokens from
EngineV2Factory.prefillGeometry before production applied later policy:
glm5NextServingScheduler (2,048 / 2,048, stripe off), the calibrated
Nemotron clamp and any dedicated scheduler policy. A GLM or Nemotron run
could therefore be attributed to the generic geometry.

ProductionBuild now carries prefillGeometry, taken from the scheduler
configuration assembleProductionBuild hands the engine. The benchmark
records the warm-up engine's value and fails the run if a measured engine
was built with different geometry, so one report-level field never
describes samples it does not cover.

A test builds a tiny paged GPT-OSS engine with and without a scheduler
policy that narrows the chunk, step and stripe, and checks the build
reports the narrowed geometry rather than prefillGeometry(model:).

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

* Count only completed tool-call deltas in the Flint test helpers, as #1549 does

FlintResponseFormatTests counted every .toolCallDelta event as a call, so
it disagreed with FlintAnswerStopTests and with #1549
(ttft/stream-auto-tool-calls), which count a delta only when it completes
a call. Both helpers now match #1549's files byte for byte, so this branch
and #1549 merge without conflicts in either file. Behavior is unchanged:
this branch does not request streamed fragments, so its engines emit only
whole .toolCall events.

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

* Raise undersized Gemma 4 step budgets to cover a whole media block

e19f138 kept the windowed rings at least one Gemma 4 media block wide,
but submit validation also refuses a block longer than the step budget
(CBv2MultimodalPlan.validate). With a chunk below the block, a stripe
that already covers it and an explicit step budget equal to the small
chunk (for example 256 / 1,120 / 256), the ring guard did not fire and
every image request failed with spanTooLong although the rings could
hold the block.

prefillGeometry now raises a Gemma 4 step budget below 1,120 tokens
(gemma4MaximumMediaBlockTokens) to 1,120. Defaults, the 512 / 2,048
rollback and other families are unchanged.

A geometry test pins the raised budget and that other families keep
theirs. A real paged Gemma 4 engine test submits a 300-token block under
chunk 256, stripe 1,120 and step 256. With the clamp removed, the
geometry test fails and the engine test catches
.spanTooLong(blockTokens: 300, maxBatchedTokensPerStep: 256).
inference.md invariant 9 records the budget bound.

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

* Name the families whose policy replaces the prompt geometry overrides

The prompt-geometry docs said an explicit DARKBLOOM_CBV2_PREFILL_CHUNK
applies to every family. Three later policies replace or cap it:
glm5NextServingScheduler sets GLM5Next's own 2,048-token chunk and step;
NemotronSuperLocalPrefill.Policy.apply sets Nemotron Super local
serving's chunk (DARKBLOOM_NEMOTRON_SUPER_PREFILL_CHUNK) and step; and
calibratedPrefillTokenLimit caps calibrated Nemotron chunks.
inference.md and the configuration rows now name these exceptions, and
point to the receipts' built geometry. The STEP_TOKENS row also records
the Gemma 4 media-block budget raise.

The changelog said solo prefill is unchanged. Solo chunking is, but the
2,048-token Gemma stripe used to shrink to 512 tokens once when KV could
not be reserved, and a plain chunk does not. On contiguous KV (Gemma 4
artifacts other than the catalog's paged gemma-4-26b-qat-4bit, or with
paging disabled), such a prompt now waits or is preempted. The fragment
now says so.

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

* Place prefill-geometry passthrough test apart from sibling PRs' insertions

Move forwardsPrefillGeometryRollbackToProviderJob up beside
forwardsPrefillOperationalControlsUnchanged, mirroring the key order in
inferencePassthroughEnvKeys, so it no longer shares an insertion point
with the serving-stalls test after the deadline-admission test. Pure move;
the test body is unchanged.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

This branch had an error being deployed

1 failed and 3 active deployments
Preview – d-inference — e8140225 Deployed Jun 13, 2026 by vercel[bot]
Preview – d-inference-console-ui-dev — e8140225 Deployed Jun 13, 2026 by vercel[bot]
Preview – d-inference-landing — e8140225 Deployed Jun 13, 2026 by vercel[bot]
benchmarks — e8140225 Deployed Jun 13, 2026 by Gajesh2007 via E2E Benchmarks #808
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