Skip to content

Gemma 4: integrate MLXFast ports and qualification metric fixes - #839

Open
davidtai wants to merge 40 commits into
masterfrom
feat/gemma4-mtp-stacked
Open

davidtai wants to merge 40 commits into
masterfrom
feat/gemma4-mtp-stacked

Conversation

@davidtai

@davidtai davidtai commented Sep 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Pin the provider to the Swift math-mode bindings and corrected Gemma 4 SDK
optimization stack, and correct two MTP qualification accounting predicates.
Provider serving code, coordinator protocols, APIs, catalogs, release versions, model
artifacts and MTP execution policy are unchanged.

Linked issue

Continues this existing PR and SDK #138.
No separate issue is closed by this update.

Dependency Before After
libs/mlx-swift 6d6796d7 3063bfbf
libs/mlx-swift-lm fb2b45fc cb0d8bfe
MLX core 3fa8f25e unchanged

The SDK selection preserves public-main work through fb2b45fc, including the
newer shared MTP/lifecycle changes. Optimization flags remain OFF by default.
The SDK now connects the validated assistant loop to its existing optional
normalization path; explicit users of that opt-in get the bounded fused path,
with the original fallback retained. It is not a reasoning/tool compatibility fix.

Correctness-only MTP checks may use actual verifier/acceptance evidence when a
short tail cancels the adaptive learning window. Performance qualification still
requires cost-learning evidence. Fixed-width automatic-cap fallback accepts a
bounded ordinary seed plan only when all speculative counters remain zero.
Exact token/finish-reason equality and the automatic work cap are unchanged.
The Python supervisor mirrors these rules and exposes production-correctness
mode; focused Swift/Python tests cover accepted and rejected metric states.

Before

flowchart LR
  A[Provider request] --> B[Provider admission and scheduler]
  B --> C[Previous Swift and SDK revisions]
  C --> D[Inference result]
  D --> E[Benchmark demands retained learning or mistakes a seed plan for drafting]
Loading

After

flowchart LR
  A[Provider request] --> B[Unchanged admission and scheduler]
  B --> C[Swift math-mode bindings and corrected Gemma SDK]
  C --> D[Model and operation opt-in gates]
  D --> E[Inference result and preserved cache lifecycle]
  E --> F[Benchmark checks actual execution evidence and exact token oracle]
Loading

Dependency order

The dependency chain is now public:

  • C #13: ad3799cb7dc1bd19fa252a4a1e2d01baccf68a23.
  • Swift #26: 3063bfbfc1ad3011a8a7a971a502b5e348e192c1.
  • SDK #138: cb0d8bfe76b1e3ce2aa134365694a0741bcad8f6.

Each exact dependency was fetched through its public URL into an independent
empty object store before publication of the consuming pin. Build from these revisions;
do not substitute moving branch tips.

Current provider base: 954f570d1ab75e5e95291c05b10c2ebd47249179.
Updated head: 108fde4cc77571e5461f95aa50bdb8c68877f11b.

Existing-PR reconciliation

David's original 01374e6c is the merge's first parent; no history is rewritten.
The other parent is current master plus the reviewed dependency/metric patch and
required changelog entry. The final tree exactly matches that prepared target.
Newer signed-app resource, release-policy and SSD shutdown fixes remain intact.

This supersedes the older serial/default-on projection with the reviewed selection.
There is no new process-global 500 MB buffer setting or MTP controller replacement.
The separate experimental core #13 and Swift #19 remain untouched and are not
dependencies. David remains the PR author; Gajesh2007 is the requested reviewer.

Test plan

Current-head validation

  • Nine Python metric-contract tests, both supervisor safety/provenance self-tests
    and five documentation-impact regression tests pass.
  • make docs-impact-check BASE=origin/master and 306-file make docs-check pass.
  • The reviewed metric source/test files match the qualified implementation.
    Documentation conflicts preserve both newer upstream content and Gemma guidance.
  • Normal pre-commit Go formatting and TypeScript lint pass (85 existing lint
    warnings, zero errors); no hooks or branch rules are disabled.
  • The unchanged pre-push hook emitted broken-pipe errors and skipped its Go/UI
    commands; its printed success is not counted. Direct UI lint/build pass.
    A direct Go 1.27.1 run failed four JSON encoding checks in unchanged coordinator
    code; all four and the complete intended coordinator package set pass under
    the pinned Go 1.25.0. The off-pin failure remains recorded separately.
  • Current-head coordinator, signature, release-integrity, documentation and UI CI
    checks pass. E2E attempt 1 built the provider and sidecar, then failed before
    model tests on HTTP 500 while downloading the unchanged nlohmann/json archive
    for metallib setup. A failed-job-only retry is running on the same head;
    provider/E2E outcomes and benchmark environment approval remain pending.
  • No fresh provider/model/GPU run was performed on this publication tuple. The
    native results below bind the earlier provider ab462896 / SDK 4d344991 /
    Swift 31761fb0 / C 95c0fa55 tuple, not this newly pinned complete runtime.

Earlier matched runtime qualification

  • Release provider build passed.
  • Source, binary and resource verification passed for 36 resolved dependencies
    and 17 runtime resource entries, including the hash-matched flat paged resource.
  • make docs-impact-check BASE=53e135e9e1467a24b3e7880d81ccd44c58e391ff passed.
  • Five docs-impact tests passed.
  • make docs-check passed.
  • Seven metric-contract tests, 32 existing benchmark tests, nine Python metric
    tests and the supervisor output-safety/artifact-provenance self-tests passed.
  • The selected SDK has 47 component methods passing normally and under Metal
    validation, plus related/shared/lifecycle coverage (201 distinct selected SDK
    methods). The pre-wiring checkpoint has 23,130 all-flags model tokens matching
    the public baseline across B1/B2/B4/B8 and three prompt/output geometries.
  • The final provider separately matched the 3,870-token baseline control and
    passed all five trained-MTP production correctness methods, including tool-
    templated and image-prefill parity. Actual assistant-norm dispatch was observed
    separately; diagnostics were excluded from all timing runs.
  • A final normal-binary ABBA target benchmark matched all 92,340 measured
    outputs and same-batch repeats. Median B1/B2/B4/B8 host decode gains were
    9.97%/13.66%/13.91%/24.51% on a 60-core, 256 GB M3 Ultra; whole benchmark
    processes were 13.61% shorter, with essentially neutral prefill. This uses
    fixed-budget EOS suppression, no MTP and no prefix cache—not fleet throughput
    or a natural-stop MTP speed claim.
  • Five short real-MTP checks, real QAT image/video and paged checkpoint restart/
    isolation passed. Another 35 Release cache methods passed; three selected
    Debug-only cancellation methods were not compiled and are not counted.

Verified provider binary SHA256:
9c4c95e8c948a730346a938af2e2d3abb83060945da6fbcbbe33285b0392d863.

Verified Metal resource SHA256:
68848dd72d30a8e5d92f7db8460c427ce0262003e60684417a892da530bee31d.

Remaining validation

The longer fixed-L4/B8 MTP matrix fails exact-token parity on both the public
baseline and candidate, including flags OFF and normal EOS controls. The metric
correction exposes that failure; it does not suppress or resolve it. The API
matrix's four reasoning/tool compatibility failures are separate work and are
not fixed here. Combined performance, optional-path memory costs and remaining
hardware/hosted/signed-runtime gates must remain explicit before activation.
Assistant fusion's isolated B1 HTTP comparison was -0.16% at the median with
overlapping ranges and identical output: no extra MTP speedup is claimed.

  • All required end-to-end release gates complete, with current evidence.

Components touched

  • Provider Swift dependency integration and benchmark qualification.
  • Documentation and changelog.
  • Fresh complete native suite and runtime tuple qualification after repinning.

Protocol / interface changes

  • No coordinator protocol, serving API, catalog or release-version changes.
  • The benchmark supervisor's production-correctness mode is documented; no
    provider wire or model-serving contract is changed.

Documentation impact

  • Canonical developer build/test documentation, Gemma validation guide and
    changelog updated alongside source.
  • Documentation-impact and documentation-lint checks pass against current master.

Notes for reviewers

Rollback: disable the opt-in paths and reload, or revert only these dependency/
metric changes relative to current master and rebuild. Do not restore the old
PR's controller/allocator settings or revert unrelated upstream fixes. Following
any separately approved dependency merge, repin to the actual merged SHAs and
repeat affected build/runtime gates before activation.


Original PR attribution (retained):

https://claude.ai/code/session_016mnuocRN7JMaSmAjSWBRWw

Refactor Pass

A dedicated refactor subagent reviewed the diff against the AGENTS.md structure, clean-code and refactor rules. Outcome: one cleanup commit, 49df604. It changes one file: +14 / −9 lines.

  • MTPBenchmarkRunner.swift: the fixed-depth and adaptive cost-exemption branches repeated the same check (verification rounds > 0 and acceptance tracked to depth N). It is now one private helper, hasVerifiedDraftWork(_:minimumDepth:), the Swift twin of the Python has_verified_depth. With minimumDepth: 1 the helper is the same as the old !acceptanceByPosition.isEmpty check.
  • Not superseded: master has none of requireCostLearningEvidence, the production-correctness mode, or the new tests and docs. The libs/mlx-swift-lm pin cb0d8bfe is not an ancestor of master's pin 1ee8675a.

Validation:

  • scripts/test-mtp-metric-contracts.py (9 OK), both run-mtp-benchmark.py self-tests, and swiftc -parse on the changed file pass.
  • Not run locally: the Swift build and MTPBenchmarkTests. Package.swift needs the libs/mlx-swift and libs/mlx-swift-lm submodules, and fetching libs/mlx-swift failed (the remote reports corruption). CI's Swift job is the gate for this commit.

For the author:

  • (Done in ad50982, see below.) The branch was 92 commits behind master and conflicted in CHANGELOG.md, docs/README.md, docs/developer/build.md, docs/developer/test.md and both submodule pins.
  • The docs/README.md stamp cites commit 361d7ca7, which does not exist.

Merge of master, ad50982 (follow-up): master dccc9ee is merged in, so the PR has no conflicts with master.

  • CHANGELOG.md: master's file, with this PR's "Unreleased — Gemma 4 MLXFast opt-in ports" section at the top. docs/README.md, build.md and test.md: master's refactor(coordinator): reorganize domain ownership and storage backends #1324 header blocks and links, plus this PR's Gemma MTP validation links. gemma-mtp-validation.md gets a date-only stamp so that docs-check passes.
  • libs/mlx-swift-lm is now bcd6f520, the merged head of mlx-swift-lm account_id stored as TEXT with no FK constraints across 9 tables — integrity, performance, and legacy key problems #138. It contains mlx-swift-lm main 94dc1976. It also has all of master's pin e407e899: merging the two gives exactly the tree of bcd6f520.
  • libs/mlx-swift is now 8eac3b04, the pin in account_id stored as TEXT with no FK constraints across 9 tables — integrity, performance, and legacy key problems #138's Package.swift. This is the head of mlx-swift Darkbloom Billing Redirect is Failing #26, which is still open. It has 3063bfb and the Hadamard layers 35e55a6. It does not have master's 0f4fe403 (mlx-swift Bump the npm_and_yarn group across 1 directory with 2 updates #28, Bonsai 2 27B exact constant reuse). No mlx-swift commit has both yet. Its mlx-c pin is ad3799cb, which adds the Metal math modes on top of 02cf6f4d.
  • The "Pinned MLX dependencies" table in docs/developer/build.md now names these pins and their gaps. On master the table was already out of date.
  • Validation:
    • make docs-check (338 files) and make docs-impact-check BASE=dccc9ee0 pass. test-mtp-metric-contracts.py (9), test-stage-test-metallib.py (12) and the radix-engine benchmark test pass.
    • swift build --build-tests in provider-swift passes.
    • MTPMetricContractTests and MTPBenchmarkTests pass (39 tests). Every suite in Tests/ProviderCoreTests/Inference/MTP/ passes (53 tests).
    • EngineV2BenchmarkMTPVerificationTests and BenchmarkProductionInputTests: the two paged cases fail on Swift 6.4, because PagedAttentionResources.swift does not find pagedattention.metal under Contents/Resources/. The lookup and test files are the same as on master. With the file at the flat path, all 12 tests pass.
    • Not run: the full run-provider-tests.sh, and the live Gemma tests (they need weights).

Follow-up (2026-10-06): master merges and re-pins

Path This PR Master Check
libs/mlx ac97252e (mlx #13 head) cb77239b ancestor
libs/mlx-swift 17bbcba7 (mlx-swift #19 head) 6923a80f ancestor
libs/mlx-swift-lm 4c9d3422 (mlx-swift-lm #138 head) e407e899 merging e407e899 changes no tree (main squash 94dc1976)
  • The "Pinned MLX dependencies" table in docs/developer/build.md names these pins. The old note about the missing 0f4fe403 is gone.
  • Validation:
    • make docs-check and make docs-impact-check BASE=origin/master pass.
    • Provider swift build --build-tests and stage-test-metallib.sh pass.
    • The MTP suites pass: 92 swift-testing tests in 10 suites, and 13 XCTest tests with 3 skips that need the root native lane.
    • The pre-push hook passed on the push.

🤖 Generated with Claude Code

davidtai and others added 27 commits September 3, 2026 16:28
`SSDPrefixCache.holdDestructiveEpochForTesting` is declared under `#if DEBUG`,
but `destructiveMutationBracketsCapabilityPublication` called it unconditionally,
so `swift test -c release` (which `scripts/run-mtp-benchmark.py --mode
production-performance` requires) failed to compile ProviderCoreTests:

    SSDPrefixCacheTests.swift:1101:19: error: value of type 'SSDPrefixCache'
    has no member 'holdDestructiveEpochForTesting'

Gate the test on the same condition as the hook. Debug builds still run it;
release test builds compile again.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DeC8iwU28kLjxCZeD8GcyE
THE TEST is one prompt of 17,408 tokens (16,384 prefill + 1,024 input), a
1,024-token output budget, batch 1, greedy, contiguous KV. The MTP matrix
could not be pointed at it: prompts were three short chat turns, the batch
set and the mode set were compiled in at [1,2,4,8] x (target-only, L=1...8,
adaptive), and any divergence from the target-only baseline threw. At 1,024
output tokens the runner aborts on `MTP token parity failed for fixed-L5,
B=1`, which is why every width number so far is a 64-token number.

Four knobs, all off by default, so the certified 40-case contract is
unchanged when none are passed:

  --prompt-tokens/--prompt-count  synthetic long prompts of an EXACT token
      count. The body is technical filler grown through the real chat
      template until the tokenizer reports at least the target, then trimmed
      to exactly it by deleting mid-filler tokens; the trailing instruction
      asks for an uninterrupted continuation so greedy decoding runs to the
      output budget instead of stopping after a paragraph. Exactness matters:
      a prompt that lands "about there" moves the sliding window, the KV
      footprint, and the per-step attention read, and stops being comparable
      to the control.
  --batch-sizes/--widths/--no-adaptive  the matrix itself. The expected case
      count is derived from them on both sides — the supervisor no longer
      hard-codes 40.
  --parity-policy record  divergence from the target-only baseline becomes
      evidence instead of an abort: which rows, where they first differ, both
      token counts, both finish reasons. Near-tie greedy divergence over
      1,024 tokens is expected and is answered by a task eval at the end of
      the program, not by killing the sweep. `enforce` stays the default and
      still refuses to publish a speedup for a stream that is not the
      target's.
  --stop-policy raw  a performance sweep on the fixed-length no-stop policy,
      so every arm emits exactly max-tokens tokens and tok/s is not
      confounded by arms stopping at different EOS positions. Opt-in by name
      (`allowsRawFixedLengthPerformance`), and the report then says
      `productionServingStopPolicy: not_in_this_report` rather than claiming
      a gate it did not run.

The report gains `parityPolicy`, `promptTokenCounts` (THE TEST's evidence
that the context really was 17,408 tokens), and per-case
`parityDivergences` / `repetitionStable`; schema 5 -> 6. Long-context
coverage flips to `covered` only when every prompt is at or past Gemma 4's
1,024-token sliding boundary.

Repetition instability is recorded the same way parity is: `.enforce`
throws, `.record` writes `repetitionStable: false` and keeps the median.

Tests: recorded parity reports the first divergence position and still
refuses to run without a target-only baseline; raw fixed-length performance
is rejected unless asked for by name and then drops the stop-policy coverage
claim; the trim helper is exact, prefix- and suffix-preserving, and refuses
to invent tokens; long-context coverage is earned, not assumed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014L39jXT8ReGzjxUoUKLfan
… see it

Two separate reasons Gemma 4 has never served MTP well, both here.

DEPTH. `MTPAutomaticVerificationPolicy.initialDraftTokens = 1` was applied to
every stateless assistant. It is not a policy — it is the smallest depth that
cannot be wrong, chosen because the Gemma drafter carries no request state and
the engine's marginal controller was reserved for drafters that do. Depth 1
caps a round at two committed tokens, a 2.0x ceiling before a token is
drafted. The B=1 control matrix on production pins (3 prompts, 64 output
tokens, contiguous KV, M5 Max, 2026-09-03) against a 126.5 tok/s target-only
baseline:

    width 1 (k=0)  118.2  -6.6%      width 5 (k=4)  171.7  +35.7%  <- optimum
    width 2 (k=1)  149.4  +18.1%     width 6 (k=5)  170.8  +35.0%
    width 3 (k=2)  159.1  +25.8%     width 7 (k=6)  155.2  +22.7%
    width 4 (k=3)  162.6  +28.5%     width 8 (k=7)  148.0  +17.0%
    adaptive       121.7  -3.8%

Per-token acceptance falls from 0.91 at k=1 to 0.64 at k=4, and the curve
still peaks there: the round commits more until the falling acceptance stops
paying for the extra verify column. Adaptive engages three times in 64 tokens
at B=1 and loses to target-only, which is why a stateless drafter gets a fixed
pin at all rather than being handed to the controller.

So the stateless default becomes `defaultStatelessDraftTokens = 4`, with
`DARKBLOOM_MTP_DRAFT_TOKENS` as the operator knob: an integer pins a depth
(clamped to the engine's tested envelope, never widening it), `adaptive` hands
even a stateless drafter to the controller. `initialDraftTokens` keeps its
name and its value 1 — it is now what an operator asks for, not what everyone
gets. The rectangular width budget stays exactly as certified: the depth knob
cannot widen it, and the engine still bounds every round by
`plannedDecodeRows * (1 + k) <= maxAutomaticRectangularTokens`, so B=4 with a
cap of 8 grants depth 1 whatever is requested.

REACH. `MTPMode.auto` refused to ask about Gemma at all: it required an
embedded `mtplx_mtp` declaration AND a Qwen model type. Gemma's assistant is
separately published, so no Gemma checkpoint can satisfy the first, and a box
that had already been given `mtp_drafter_path` still decoded target-only
unless an operator additionally typed `mtp_mode = "on"`. A declared drafter
path IS the operator naming the head; `auto` now honours it for `gemma4` /
`gemma4_text`, and a Gemma checkpoint that ever ships an inline head
self-activates without another edit to the family switch.

What `auto` still refuses is going looking: no embedded head and no declared
path means the checkpoint is not asked about — no catalog lookup, no
prefetch. Catalog pairing remains `mtp_mode = "on"`, and the catalog prewarm
stays gated on `on` for the same reason. Qwen is unchanged: a declared path
alone is not a reason to ask about a checkpoint whose head is supposed to be
inline.

Tests: the stateless default is the measured 4 and is overridable, clamped,
`adaptive`-aware, garbage-tolerant, and never applied to a request-stateful
drafter; the rectangular knob only tightens; auto activates Gemma on a
declared path and not on a blank one, and Qwen's embedded rule is unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014L39jXT8ReGzjxUoUKLfan
…ned constant

The first version of the builder guessed 180 tokens per filler paragraph and
cut the surplus out of the middle at `target / 2`. Both numbers were picked
so that 17,408 worked. Neither survives contact with another size: at a small
target the `target / 2` cut lands inside the trailing instruction and quietly
deletes it, so a 64-token prompt is a different KIND of prompt from a
17,408-token one and a sweep across lengths measures the builder as much as
the engine. That is the failure mode the owner named, and it was mine.

The builder now measures the template instead of assuming it. Three probe
tokenizations of the SAME chat template it is about to use — body with no
filler and no instruction, body with no filler, body with one filler unit —
difference out four facts:

    templateHead        common prefix of the last two (they differ only by
                        inserted filler)
    templateTail        common suffix of the first two (they differ only by
                        the instruction)
    instructionTokens   their size difference
    tokensPerFillerUnit the per-unit slope

The body is then sized from that measured slope, which converges in ONE step
for any target and any tokenizer, and the surplus is deleted from regions
those measurements identify: filler first, the instruction only if the
request is too short to hold it, and the chat template's own control tokens
never. So the result is a well-formed turn at every length from the
template's own minimum (`templateHead + templateTail`, itself measured) up to
the full context window, and a request below that minimum is refused with
both numbers named rather than served as something that is not a chat turn.

`trimmed(tokenIDs:target:removableInPriorityOrder:)` replaces
`trimmedToExactLength`: it takes the removable regions as an argument instead
of computing an index from the target, so what is protected is stated by the
caller from measurement and is visible in a test.

Tests work on synthetic token arrays with no tokenizer at all: the shape
probe is exact for four different template geometries including degenerate
zero-length heads and tails; the builder lands on the exact count at the
template minimum, 20, 64, 70, 512, 1024, 17408 and 65536 tokens with at most
one growth step at each; the control tokens survive at every one of them; the
instruction survives whenever the request has room for it; and out-of-order
or too-small regions are refused.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014L39jXT8ReGzjxUoUKLfan
Audit against the rule that nothing may be tied to a prompt length, a context
size, a KV window or a chunk size. `MTPAutomaticVerificationPolicy` passes:
`fixedDraftTokens` takes a drafter capability and an environment and reads
nothing else, and `maxRectangularTokens` is keyed on the CHIP, so the same
machine returns the same width budget whatever it is serving. There was
nothing to fix — so this installs the guard that keeps it that way, because
a policy of this kind is exactly where a length-keyed branch gets added later
by someone chasing one benchmark.

`depthPolicyIsShapeIndependent` fixes the drafter capability and the
environment and asserts the answer does not move; a future length-keyed
branch would have to change the signature to compile, which is the point.

The doc now states the contract rather than leaving it implicit: the constant
is a constant and not a table, the depth is only ever a REQUEST, and
degradation across shapes belongs to the engine, which clamps each round by
the rectangular width budget, the step token budget and KV headroom — all
computed per plan from live state. Picking a number per shape here would be
doing that job with facts this type does not have.

Recorded honestly: `defaultStatelessDraftTokens = 4` was derived from a
64-token, three-short-prompt matrix, and the cost model says the optimum
should move DEEPER as context grows, because the target step gets more
expensive with KV length while the drafter and the extra verify column barely
do. Re-derive it at length; if the answer differs, change the one constant or
set the knob — do not add a length-keyed branch.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014L39jXT8ReGzjxUoUKLfan
…s to the controller

A4b settled what the acceptance collapse was. The benchmark's synthetic filler
gives 0.65 acceptance at a 512-token prompt and 0.66 at 17,408 — the same
number at both lengths — while the product's real chat prompts give 0.91. It
was never context length. The filler is simply unpredictable, so every MTP
number measured on it was measuring the filler, and the cost/acceptance model
has to be re-fit on text a model can actually predict.

So `--prompt-file <path>` sizes REAL TEXT to exactly `--prompt-tokens` tokens.
It reuses the measured-region machinery rather than adding constants: two
probes — an empty-bodied templated prompt and a one-copy one — differ only in
the body, so their common prefix and suffix ARE the template's head and tail,
and the body region between them is what gets cut. Two probes rather than the
synthetic path's three because a real document supplies its own ending and
needs no instruction appended. A file longer than the target is trimmed inside
that region; a shorter one is repeated with a separator that names the part,
from the measured per-copy slope, so it converges in one step for any file and
any target. The template's control tokens are never cut, and a target below
the template's own measured minimum is refused with both numbers named.

The report gains `promptSource` (`synthetic` or `file`) and the launch pins
it, because a synthetic report and a real-text report are not comparable and
nothing else in the report says which one you have. Schema 6 -> 7. The
launch fingerprint covers the file's sha256, so a changed prompt file cannot
masquerade as the same run.

Second change, from §0e of the report: stateless drafters now default to the
ADAPTIVE depth controller instead of a fixed pin. The arms are lopsided in
both directions — a pin of 4 measured +35.7% on 64-token chat prompts and
-15.7% at THE TEST, while adaptive measured -3.8% and -1.2% — because the
controller priced speculation, found it unprofitable at that shape and
selected depth 0 for 1,002 of 1,018 decisions. A constant that is +36% at one
context and -16% at another is shape coupling expressed as a constant instead
of as a branch, which is the same defect the depth policy is otherwise careful
to avoid. Adaptive's one measured loss came from a 64-token run that gives the
controller three rounds to warm up and ends while it is still exploring; that
is not a fair test of a controller, and no production request is 64 tokens
long. `DARKBLOOM_MTP_DRAFT_TOKENS=<int>` remains the fixed override.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…eport

Arm A's round regression took ~90 minutes of GPU time and a fit across two
reports to localise, because the per-stage timing the engine has recorded
since `b58e13b` stopped at `CBv2MTPMetrics` and never reached the report JSON.
§7 of the program report flagged that gap at the time and it went unclosed;
with the column present the answer would have been one field —
`draftBuildNanos` per round against the production-pin baseline.

`MTPBenchmarkRoundTiming` projects it whole: `hostGapNanos` (the dead window
between the previous round's finalize and this round's submit — dead because
MTP rounds never chain), `captureNanos`, `draftBuildNanos`, `verifyBuildNanos`,
`submitNanos`, `packetWaitNanos` (the blocking acceptance readback, i.e. the
round's GPU time as the host sees it), `acceptWalkNanos`, `rowFinalizeNanos`,
and `minRoundNanos` / `maxRoundNanos` so a reader can tell a single-shape run
from a mixed one before believing a mean of it. `meanRoundMs` and
`meanFixedCostMs` are derived rather than stored.

It costs nothing to collect: the engine already takes these host timestamps,
and this only carries them across the seam.

Treated as the performance measurement it is — omitted by
`withoutPerformanceMeasurements()`, so non-performance reports do not carry
it, and added to the launcher's `PERFORMANCE_KEYS` so that invariant is
enforced rather than assumed. A target-only case must have no round timing at
all, which `validateNoSpeculativeWork` now asserts alongside the other
zero-work fields. Schema 7 -> 8 on both sides.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The measured Gemma 4 serial stack ran MLX_MAX_MB_PER_BUFFER=500. It is the one
switch in that stack that cannot be fixed at an engine default: MLX C++ reads it
once, at first Metal device construction, and otherwise takes the hardware
default of 50 MB on an M5 Max. There is no Swift reader to change.

`GemmaOptimizationEnvironment.apply` runs at serve start, ahead of any MLX array
or device use (ServeRuntimePreparer.swift:27, StartCommand.swift:148), which is
exactly the point the variable has to be set at. So the projection carries it.

It is projected at its measured value in BOTH postures, enabled and disabled,
because it is not one of the config-backed Gemma controls — it is a property of
the machine the stack was measured on, not a posture the operator selects.

`GemmaOptimizationEnvironmentTests` pinned exactly three keys and now pins four,
including both projection-equality assertions.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JqPiHQdi2SSC7iC5VPNsUT
THE TEST specifies a 40 C thermal hold. The serial arm runner honours it before
each ARM, but the MTP matrix runs every case inside ONE `swift test` process, so
nothing held between cases: the depth sweep ran 7 modes x (1 warmup + 3 reps)
back to back for 5.2 minutes and the later modes measured hotter than the
earlier ones. Depth 4 and depth 5 were measured on a warmer part than
target-only and depth 1.

The obvious place for the hook is the Python wrapper, and it is the wrong place.
`run-mtp-benchmark.py` launches `swift test` once and waits; it never sees a
case boundary. Its `for case in cases:` loop is the report VALIDATOR, which runs
after the matrix has finished, so a hook there would fire after every case had
already been measured. The hold has to happen where the cases iterate.

So `MTPBenchmarkRunner.run` reads MTP_PRE_CASE_CMD once and runs it through
/bin/zsh before each case's WARMUP -- before, not between warmup and
measurement, because the warmup heats the part too. `MTP_CASE` carries the case
description so one command can log or branch per case.

A non-zero exit is recorded, not thrown. A thermal gate that times out should
leave a mark in the report and let the matrix finish; aborting a five-minute run
would discard the cases that had already been measured correctly.

Report schema 8 -> 9:
  - `preCaseCommand`, top level, the command verbatim or null.
  - `preCaseExit`, per case, the exit status or null.

`preCaseExit` is NULLABLE on purpose. Recording 0 when no command was
configured would make "a hold ran and succeeded" indistinguishable from "nothing
held", which is exactly the ambiguity that let the depth sweep look consistent.
Every report before schema 9 is the second case, and now says so by carrying
null rather than a comforting zero.

The wrapper gains `--pre-case-cmd`, which only forwards the string as
MTP_PRE_CASE_CMD and then CHECKS it: `validate_report` fails if the report's
`preCaseCommand` is not the command that was requested. A report that silently
held nothing is the defect this exists to make visible, so it is verified rather
than trusted.

The flag is optional and existing invocations are unchanged apart from the two
new fields. A schema-9 report cannot be compared field by field with the
schema-8 reports from S1 through S6c.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… engine

Pins libs/mlx-swift-lm to feat/gemma4-port-trimmed @ 1190c04d (the trimmed
Gemma 4 serial port with the serial levers folded in) and projects
MLX_MAX_MB_PER_BUFFER=500 before MLX initializes.

MLX_MAX_MB_PER_BUFFER is the one switch in the measured serial stack that
cannot be fixed at an engine default: MLX C++ reads it once, at first Metal
device construction, and otherwise takes the hardware default (50 MB on an
M5 Max). `GemmaOptimizationEnvironment.apply` runs at serve start ahead of any
MLX array or device use (ServeRuntimePreparer.swift, StartCommand.swift), so
the projection carries it, at its measured value in both postures. Mirrors the
MTP-on-serial provider commit d155086.

`GemmaOptimizationEnvironmentTests` pinned three keys and now pins four, in
`expectedKeys`, both projection-equality assertions, and the apply-boundary
assertion.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The benchmark harness never applied `GemmaOptimizationEnvironment`. Nothing in
`ProviderBenchmark` called `apply`, and `BenchmarkGemmaOptimizations` only
RECORDS the projection into the report payload without setting anything. So
every arm ran with `MLX_MAX_MB_PER_BUFFER` unset -- 50 MB on an M5 Max -- while
the serve path projects 500. The benchmark was not measuring the serving
process.

MLX reads that variable once, at first Metal device construction, so it has to
be set before the model loads. `applyServingEnvironment()` is therefore the
first statement of `MTPBenchmarkRunner.run`.

It calls the provider's own `apply`, so the table is not duplicated and bench
and serve cannot drift by editing one of two lists. What differs is the write
rule: `apply` normally overwrites (`setenv(..., 1)`), which would let the
projection stomp a value an arm set deliberately, so the `set` closure skips any
key already present. An explicit arm setting always wins; the projection only
fills in what nothing chose.

Recorded in the report as `mlxMaxMBPerBuffer`, the value as the process actually
saw it. Nil means unset, which is the 50 MB every report before this one
silently carried. Schema stays 9: the field is additive and the wrapper's
validator does not enumerate keys.

One consequence to weigh before reading build7 against earlier arms. The
projection also sets `DARKBLOOM_GEMMA4_PREFILL_CHUNK_EVAL=18` and the two
weighted-R1 keys, and no arm JSON sets `..._CHUNK_EVAL`, so the benchmark
process now gets those too. That is the point of the fix -- bench should equal
serve -- but it means build7 changes more than the buffer cap, and a difference
against S6c is not attributable to the cap alone.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…-perf)

The measured Gemma 4 serial stack's largest single decode lever is the D=512
two-pass vector SDPA for the five global layers (+9.4%/+10.4% with dedup), reached
at B=1 through MLXFast.scaledDotProductAttention. It is an MLX kernel, not a
mlx-swift-lm Swift lever, so the base cannot reproduce the measured decode on
upstream mlx-swift 6b0505c — it needs the perf-stack mlx-swift whose nested
Source/Cmlx/mlx is bb794a7 (stock 734241b + softmax/SDPA unroll, composed-prefill
causal bias, gather-QMM elision, affine-QMV tier, D512 two-pass, D512 dedup).

Pins libs/mlx-swift at feat/gemma4-mlx-perf eae562a (records nested mlx bb794a7),
matching David's order that PR1 carries the mlx-swift Gemma 4 perf promotions.
The staged mlx.metallib is rebuilt from bb794a7.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
6ef2a52 called `GemmaOptimizationEnvironment.apply(_:context:getenv:set:)`
from `ProviderBenchmark` and did not build: that overload is internal, so
across a module boundary only the two-argument `apply(_:context:)` is visible
and the compiler reported "extra argument 'set' in call".

The seam already exists and already takes injected `getenv` and `set` closures.
It is now public, because the benchmark is a legitimate second consumer with a
different write rule: serving overwrites unconditionally, while the benchmark
must fill in only what nothing else chose so an arm's explicit setting survives.

The alternative was to copy the projection table into `ProviderBenchmark`, which
is exactly how bench and serve drift apart, so the visibility change is the
cheaper of the two.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
PR 2's provider changes on top of the base PR's provider tip (408a66d,
"pin mlx-swift to the Gemma 4 perf stack"). Eleven commits come across:
the MTP benchmark matrix, the measured depth policy, the synthetic-prompt
sizing, the per-round stage timing, the per-case thermal hold, the
serving-environment projection for the benchmark process, and the public
apply seam.

Conflict resolutions
--------------------

libs/mlx-swift-lm (distinct types on each side). The MTP branch had
committed a SYMLINK to a local worktree path
(.worktrees/mlx-swift-lm-mtp-candidates) -- a development convenience that
cannot ship. The base PR keeps it as a real gitlink. The gitlink wins, and
it points at the stacked engine tip 83c0e37f ("fix(mtp/drafter): rejoin the
cached RoPE prefix at the hidden's own rank", one commit past the engine merge
fb67c639), which is the engine this provider is built and measured against.

libs/mlx-swift. No conflict: only the base moved it, so the base PR's
eae562a (feat/gemma4-mlx-perf, nested mlx bb794a7) carries through
unchanged. That pin is what the D512 two-pass SDPA + dedup lever lives in.

GemmaOptimizationEnvironment.swift. Both branches independently added the
MLX_MAX_MB_PER_BUFFER=500 projection, and the merged file is byte-identical
to the MTP branch's: the only delta versus the base is the `public` on
`apply(_:context:getenv:set:)`, which the benchmark runner needs so bench
and serve share one projection table instead of drifting apart.

GemmaOptimizationConfigTests.swift. Union, and both halves are load-bearing:
the MTP branch's test that the projected environment carries the serving
buffer cap, and the base's addition of that key to the full expected
projection table.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ests compiles

`swift build -c release --build-tests` failed to compile ProviderCoreTests:
`SSDPrefixCacheTests.swift: value of type 'SSDPrefixCache' has no member
'holdDestructiveEpochForTesting'`. Root cause: that hook exists in the source only
under `#if DEBUG` (SSDPrefixCache.swift), but the test
`destructiveMutationBracketsCapabilityPublication` called it unconditionally, so a
release build (DEBUG off) drops the hook and the test target fails to compile.
Pre-existing since #549; unrelated to the Gemma 4 / mlx-swift work in this branch.

Wraps that one test in `#if DEBUG` to match the hook's gating: it runs in debug and
is excluded from release `--build-tests`, which now compiles clean. No product change.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…changed)

The engine tip advanced to 29828b66 (two stale-expectation test fixes:
CBv2CoreTests.innerState count, CBv2LastQueryPrefillTests frontier SDPA near-tie).
Both are Tests/-only; Libraries/ product is byte-identical to 1190c04d, so the darkbloom
binary is unchanged. Pin updated for coherence and the MTP re-merge.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Cherry-picked 83c0e37f (fix(mtp/drafter): rejoin the cached RoPE prefix at the hidden's
own rank) onto the engine so drafterChainParityVsV1 no longer fatal-aborts the base test
binary. Drafter code only — inert on the B=1 serial decode path (MTP off), so the confirm
arm's serial number is unchanged; enables the full engine suite to run MTP/Drafter with
zero skips.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…tive right

Two harness defects, both of which made a correct run look like a broken one.

1. Draft depth 0 is the baseline, and the validator demanded speculation from it
-----------------------------------------------------------------------------

Verification width 1 is draft depth 0: the rectangle is the bonus token alone, so
the round drafts nothing and verifies nothing. `validateMetrics` nonetheless
required the certificates of speculation from it -- a decode-row bucket, and one
layer down a per-depth cost input -- and both are recorded per SPECULATIVE round.
`--widths 1` therefore died with

    invalid MTP benchmark engine metrics: fixed-L1, B=1 never observed
    decode-row bucket 1

and because `--widths` was also required to be non-empty, the harness had no
spelling at all for "run the baseline and no speculation". That is not a
hypothetical: it is why a target-only-only arm could not be requested.

A depth-0 fixed case now validates on what is actually checkable -- nothing was
drafted, and no round selected a positive depth -- and returns before the
speculative certificates. A depth-0 case that proposes tokens is a pin that did
not take, and it still fails, loudly.

An explicitly empty `--widths` is now accepted and means no fixed cases. UNSET
and SET-BUT-EMPTY are kept distinct end to end: unset means "sweep the default
envelope", and collapsing the two would silently turn a target-only-only arm into
a full 1...8 sweep.

2. `repetitionStable` asked adaptive a question it cannot answer
---------------------------------------------------------------

The flag compares the TOKEN IDS of a case's measurement repetitions. Every
fixed-width row and target-only report true. The adaptive row reports false, on
both measured binaries -- and that is structural, not an instability.

The controller prices depths from measured wall-clock cost, so two runs cannot
agree on which round is served at which depth, and the schedule is wide: one
adaptive run served {0: 1, 1: 2, 2: 61, 3: 223, 4: 9, 5: 9, 6: 1, 7: 6} across
309 rounds -- eight different verify widths. A different width is different
arithmetic (`qmv` against `qmv_wide`, a different accumulation order), so a
near-tie token flips and the streams part. It is the same near-tie class the
rectangular verify already documents, reached by changing the width between RUNS
rather than between serial and MTP.

So token identity across repetitions is a property the fixed modes have and the
adaptive mode does not. `repetitionStableRequired` now records which of the two a
case is, and `--parity-policy enforce` fails only on `!repetitionStable &&
repetitionStableRequired`. Before this, an enforcing adaptive run would have
failed every time for behaving as designed.

The measurement itself is unchanged and still reported. A false on a FIXED row
is still a real defect, because there the arithmetic is identical every run.

Report schema 9 -> 10 for the new field.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Base tip aa820e7 = the SSDPrefixCacheTests DEBUG gate + an engine pin bump.

Two conflicts:

  SSDPrefixCacheTests.swift    Both branches independently gated the
                               destructive-epoch capability test on `#if DEBUG`
                               -- the hook it calls,
                               `holdDestructiveEpochForTesting`, is DEBUG-only in
                               `SSDPrefixCache.swift`, so `swift test -c release
                               --build-tests` fails to compile without it. Same
                               fix, different comment and indentation. The base's
                               form is kept, so this PR carries no cosmetic
                               difference from the branch it stacks on.

  libs/mlx-swift-lm            Repointed at this branch's engine tip b8687afb,
                               which is eb378720 (the base's engine) merged with
                               this branch's MTP work. The base pins eb378720;
                               taking either side's sha would have built the
                               wrong engine.

`libs/mlx-swift` stays at eae562a and `libs/mlx` at 734241bb, both PR 1's.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Engine amended to drop the stacked-only test (Gemma4MTPDrafterSemantics) so the full
engine --build-tests compiles on the base; product fix (applyCachedDrafterRoPE) and the
base-compatible regression test are unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Base tip b46ee28 pins the amended base engine 4fd0a39f. The only conflict is
`libs/mlx-swift-lm`, repointed at this branch's engine tip
5d88fea3 -- 4fd0a39f merged with this branch's MTP work plus the
four fixes. Taking either side's sha would have built the wrong engine.

`libs/mlx-swift` stays at eae562a and `libs/mlx` at 734241bb, both PR 1's.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014YQnDauetDsfHT14JjgbMq
Engine restored origin/main's MTP path (speculationEnabled true, depth ceiling
testedMaxDraftTokens=7) and closed the fast-ack teacher-forced scoring race. MTP-general
only; the B=1 serial decode path is unchanged (serial arm runs mtp-off by config).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014YQnDauetDsfHT14JjgbMq
Engine 42ee6692 fixes the last 2 of the 47 MTP-path regressions that
base-reds-verify measured:
- 809eb993 reverts the CBv2 drafter to origin/main, dropping the serial-port
  cached-RoPE pre-rotation that diverged the draft chain from v1 — fixes
  drafterChainParityVsV1.
- 42ee6692 makes isTargetOnlyPolicy inert at maxDepth==0 (only
  !speculationEnabled, matching main), restoring the depth-0 baseline probe —
  fixes fixedDepthZeroProbesOnceThenKeepsNormalChaining.

All 9 MTP suites (121 tests) pass with zero failures and no crash
(verify-mtp-repair.ok, engine 42ee6692).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011zGoVgUpi4xNWxb3mXZbQK
…ion projection

93dfc2c added MLX_MAX_MB_PER_BUFFER=500 to GemmaOptimizationEnvironment.projection
unconditionally, so it leaked into the .retainedValidation context as well as
.serving. But .retainedValidation is the hermetic control-authority set —
PackagedRuntimeSmoke.validateRetainedProjection pins it to exactly the three
coupled Gemma control keys and throws on any extra key. The extra buffer key
therefore broke the "Packaged retained-Gemma smoke" tests AND, more importantly,
would throw at runtime in every production caller of
PackagedRuntimeSmoke.retainedValidationEnvironment() — SelfUpdater artifact
verification (SelfUpdater.swift:1161) and the paged-kernel preflight
(PagedKernelPreflight.swift:74).

Root cause: the buffer cap is a live-serving / benchmark runtime refinement, not
a config-backed Gemma control (MLX C++ reads it once at first Metal device
construction). It belongs only to a process that will actually serve or
benchmark, exactly like the serving-only safe-R1 trust default the same context
switch already refines. Fix: add maxMBPerBufferKey only when context == .serving.

Serving/benchmark behavior is unchanged (all serving callers use the default
.serving context: ServeRuntimePreparer, StartCommand, BenchmarkGemmaOptimizations),
so the confirm-arm number is unaffected. The retained set returns to the exact
pre-93dfc2cd three-key posture the smoke gate ran at.

Regression test: GemmaOptimizationEnvironmentTests.bufferCapIsServingOnly asserts
the cap is present in .serving and absent from .retainedValidation (fails without
this fix, passes with it).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AghetWQKbg4mKE3FpRWzdF
…ving-only buffer cap

Merges feat/gemma4-port-trimmed @ 3e20a24 into the provider's
feat/gemma4-mtp-stacked. The provider base moved past its previous merge point
(b46ee28) by two engine-pin bumps (96d4d93 -> cfa2bb2b, 5009a27 -> 42ee6692)
and one provider fix (3e20a24).

Conflict, resolved manually:
  - libs/mlx-swift-lm (submodule gitlink). The three sides all differ
    (base 4fd0a39f, ours 5d88fea3, theirs 42ee6692) and git cannot follow the
    submodule merge-base from the superproject (it has no engine objects), so the
    gitlink is set directly to the new engine merge tip
    18713732381b28871ee67fda12a86479338e850e — the engine's
    feat/gemma4-mtp-stacked after its own base re-merge. The engine side is what
    this PR's provider must pin. libs/mlx (734241bb) and libs/mlx-swift (eae562a)
    are identical on all sides and unchanged.

Clean auto-merges (no conflict), both correct on inspection:
  - GemmaOptimizationEnvironment.swift — theirs (3e20a24) makes the
    MLX_MAX_MB_PER_BUFFER cap serving-only, so it stops leaking into the
    .retainedValidation control set that validateRetainedProjection pins to the
    three coupled Gemma keys. OURS only added `public` to the `apply` seam (a
    disjoint region), so git applies theirs' `projection` change on top of ours':
    the result keeps ours' public benchmark seam AND theirs' serving-only cap.
    Ours' `projection` was byte-identical to the merge-base there, so theirs' fix
    lands exactly as authored.
  - GemmaOptimizationConfigTests.swift — union: theirs adds bufferCapIsServingOnly
    (no name collision with ours).

The on-disk working tree keeps libs/mlx-swift-lm as a symlink into the engine
worktree (the build compiles the live merged engine through it); the committed
tree records a proper 160000 gitlink, so the push is a clean submodule pin.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016mnuocRN7JMaSmAjSWBRWw
…ace fix)

Points libs/mlx-swift-lm at the engine's feat/gemma4-mtp-stacked tip
0cb4c68db43564bfd4cce482a98f1fdeed1b3713 after the test-only confinement fix for
CBv2QwenMTPIntegrationTests.forcedPolicy (the engine-thread-confinement data race
that crashed the build-3 filter). No provider code change; libs/mlx (734241bb)
and libs/mlx-swift (eae562a) unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016mnuocRN7JMaSmAjSWBRWw
The Swift MTPBenchmarkReport bumped currentSchemaVersion 9 -> 10 in
17e732b (2026-09-04), which added repetitionStableRequired to every
case; preCaseExit had already arrived in the schema-9 hold-between-cases
work (05430ab). The wrapper still pinned REPORT_SCHEMA_VERSION = 9, so
validate_report raised "schemaVersion is 10, expected 9" and the runner
reported failure on every complete run.

Bump REPORT_SCHEMA_VERSION to 10 and make the per-case check aware of the
new fields: accept a nullable preCaseExit (nil/absent when nothing held,
otherwise an integer exit status) and, when repetitionStableRequired is
set, require repetitionStable to be true (the adaptive controller
declares it not required, so its run-to-run depth schedule may differ).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016mnuocRN7JMaSmAjSWBRWw
@vercel

vercel Bot commented Sep 5, 2026

Copy link
Copy Markdown

Deployment failed for project d-inference with the following error:

You don't have permission to create a Preview Deployment for this Vercel project: d-inference.

View Documentation: https://vercel.com/docs/accounts/team-members-and-roles

Preserve the original PR history and current upstream. Select the reviewed operation-scoped ports, modern sampled MTP and unchanged production policies. Historical default-on serial/controller/allocator experiments are superseded by the reviewed stack; model artifacts remain unchanged.
@vercel

vercel Bot commented Sep 18, 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 Sep 18, 2026 3:10am UTC
d-inference-console-ui-dev Ready Ready Preview Sep 18, 2026 3:10am UTC
d-inference-landing Ready Ready Preview Sep 18, 2026 3:10am UTC

Request Review

@jonathan308 jonathan308 changed the title Gemma 4 26B-A4B: base port + MTP speculative decoding (serial path) Gemma 4: integrate MLXFast ports and qualification metric fixes Sep 18, 2026
@davidtai

Copy link
Copy Markdown
Collaborator Author

Looks good, approved after merges conflicts are resovled.

Fixed and adaptive cost-exemption guards repeated the same verification
and acceptance-depth expression; one helper now mirrors has_verified_depth.

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

vercel Bot commented Oct 4, 2026

Copy link
Copy Markdown

Deployment failed for project eigen-homepages-darkbloom with the following error:

You don't have permission to create a Preview Deployment for this Vercel project: eigen-homepages-darkbloom.

View Documentation: https://vercel.com/docs/accounts/team-members-and-roles

@vercel

vercel Bot commented Oct 4, 2026

Copy link
Copy Markdown

Deployment failed for project d-inference-console-ui-dev with the following error:

You don't have permission to create a Preview Deployment for this Vercel project: d-inference-console-ui-dev.

View Documentation: https://vercel.com/docs/accounts/team-members-and-roles

@vercel

vercel Bot commented Oct 4, 2026

Copy link
Copy Markdown

Deployment failed for project d-inference-landing with the following error:

You don't have permission to create a Preview Deployment for this Vercel project: d-inference-landing.

View Documentation: https://vercel.com/docs/accounts/team-members-and-roles

Resolve CHANGELOG.md, docs/README.md, docs/developer/build.md and
docs/developer/test.md by keeping both sides in master's layout.
Pin libs/mlx-swift-lm to bcd6f520 (mlx-swift-lm #138 merged with main
94dc1976, which contains master's e407e899 content) and libs/mlx-swift
to 8eac3b04 (the revision in bcd6f520's Package.swift). The mlx-swift
pin does not contain master's 0f4fe403 (mlx-swift #28). Update the
pinned dependency table to match, and give the Gemma MTP validation
doc a date-only freshness stamp.

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

vercel Bot commented Oct 6, 2026

Copy link
Copy Markdown

Deployment failed for project darkbloom-status with the following error:

You don't have permission to create a Preview Deployment for this Vercel project: darkbloom-status.

View Documentation: https://vercel.com/docs/accounts/team-members-and-roles

@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Threat model review — advisory

Reviewed head bb12625e92a0 against base 4230fa03ddbc.

Review not completed for this head. Previous findings are superseded, not confirmed resolved.
Model returned an invalid review response

Scan incomplete: 3 file(s) could not be fully read as text. Binary, Git LFS and submodule changes require manual review.
Affected files: libs/mlx, libs/mlx-swift, libs/mlx-swift-lm

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

Coverage: 8/83 source units; cross-file integration pending. 0 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: 4 request(s), 211603 input / 3524 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.

Resolve CHANGELOG.md: keep this branch's Unreleased section first and
master's new "generated API-key queries" section after it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
davidtai and others added 6 commits October 6, 2026 16:37
CHANGELOG.md: keep both sides. This branch's Gemma 4 section stays
first, then master's new sections.

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

- libs/mlx: 3fa8f25e -> 725859207 (Layr-Labs/mlx#13 head). It is the
  same revision as the libs/mlx-swift nested Source/Cmlx/mlx pin.
- libs/mlx-swift: 8eac3b04 -> 9fb21921 (Layr-Labs/mlx-swift#19 head).
  It contains #26 (8eac3b04) and main's 0f4fe403, with mlx-c ad3799cb.
- libs/mlx-swift-lm: bcd6f520 -> ccea2740 (Layr-Labs/mlx-swift-lm#138
  head). Its Package.swift pins mlx-swift 9fb21921.
- docs/developer/build.md: add the libs/mlx row, update the other two
  rows, and remove the note that the Swift pin does not contain 0f4fe403.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CHANGELOG.md: keep both sides. This branch's Gemma 4 section stays
first, then master's account erasure section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- CHANGELOG.md: keep both sides. This branch's Gemma 4 section stays
  first, then master's MLX gather row-tile section.
- docs/developer/build.md: keep this branch's pin table and notes. The
  next commit re-pins all three packages and rewrites the table.
- libs/mlx, libs/mlx-swift: keep this branch's gitlinks here. The next
  commit moves them to heads that contain master's pins.

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

Each pin contains master's pin:
- libs/mlx: 725859207 -> ac97252e6 (Layr-Labs/mlx#13 head). It merges
  mlx main, so master's cb77239be is an ancestor. Same revision as the
  libs/mlx-swift nested Source/Cmlx/mlx pin.
- libs/mlx-swift: 9fb21921 -> 17bbcba7 (Layr-Labs/mlx-swift#19 head).
  Master's 6923a80f is an ancestor; so are 0f4fe403 and #26 (8eac3b04).
- libs/mlx-swift-lm: ccea2740 -> 4c9d3422 (Layr-Labs/mlx-swift-lm#138
  head). Master's e407e899 is the #290 head that main squash-merged as
  94dc1976; merging e407e899 into 4c9d3422 gives the same tree.
- docs/developer/build.md: rewrite the pin table with the nested MLX
  row from master, and keep master's notes on the nested MLX source and
  scripts/fetch-metallib.sh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
davidtai and others added 2 commits October 8, 2026 23:30
Resolve docs/developer/build.md and test.md by keeping both sides in
master's layout. Pin libs/mlx-swift-lm to the mlx-swift-lm PR #138 head
b6218297, which merges SDK main 3fd4944c (#165 typical acceptance) into
the Gemma 4 stack. libs/mlx ac97252e and libs/mlx-swift 17bbcba7 contain
master's cb77239b and 6923a80f.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolve CHANGELOG.md by keeping both entries: the Gemma 4 MLXFast ports
section and master's provider cache storage controls section. Pins are
unchanged.

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

This branch was successfully deployed

3 active (outdated) deployments
benchmarks — bb12625e Deployed Oct 9, 2026 by davidtai via E2E Benchmarks #2494
Preview – d-inference — 108fde4c Deployed Sep 18, 2026 by vercel[bot]
Preview – d-inference-console-ui-dev — 108fde4c Deployed Sep 18, 2026 by vercel[bot]
Preview – d-inference-landing — 108fde4c Deployed Sep 18, 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