Skip to content

GLM and MiMo: a short prompt's speed no longer refuses long prompts (DARKBLOOM_TTFT_NATIVE_PREFILL_EVIDENCE) - #2072

Merged
jonathan308 merged 7 commits into
devfrom
fix/native-prefill-long-prompt-evidence
Nov 13, 2026
Merged

jonathan308 merged 7 commits into
devfrom
fix/native-prefill-long-prompt-evidence

Conversation

@jonathan308

@jonathan308 jonathan308 commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

What

GLM-5.3-Flash and MiMo V2.6 Macs price a prompt's first-token time from one isolated-prefill estimate. On their native
bridges that estimate is set by whatever cold prompt ran last on an idle Mac, whatever its size. A prompt of a few
tokens takes about as long as the request's fixed setup, so it reads as 9-140 tok/s on GLM Macs that read prompts above
4K tokens at 1,378-2,031 tok/s. The Macs then refuse nearly every longer request as deadline_unreachable, and a
refusal measures nothing, so the estimate never recovers: native engines have no calibrated floor and no refusal-streak
probe (!supportsPrefillRecoveryRetirement), and their recovery admits only prompts of up to 1,024 tokens, which
re-learn a low rate.

This PR (NativePrefillEvidence, on by default) covers GLM-5.3-Flash and native MiMo bridges only
(EngineV2Bridge.nativePrefillEvidenceApplies: admission fixes on, the switch on, a native engine, no reviewed deadline
profile, and isGLM5NextManaged || nativeTransactionID != nil). Diffusion Gemma's native block engine and every
ordinary engine keep today's estimator.

  • A cold isolated sample from a prompt of at most 4,096 tokens raises the estimate when it is faster and is otherwise
    left out of it
    (a short prompt's rate bounds a longer prompt's from below). It also stays out of
    observed_prefill_tps and the published isolated_prefill measurement; its prompt-size bucket keeps it.
  • Calibration cells and longer prompts move the estimate either way, alone date the evidence
    (nativeRateEvidenceAt) and alone restart the estimate 120 s after the newest; a faster short sample blends in. The
    published isolated aggregate restarts with the estimate.
  • On an idle Mac at nominal posture whose evidence is older than 120 s (or has none), prefill is priced at no less
    than its own calibration cell
    . Fresh evidence, a busy Mac or another posture keep the ordinary engines' 1/8-anchor
    floor. Old evidence never skips the projection (a native step cannot be preempted).
  • The smallest prompt-size bucket (≤ 1,024 tokens) no longer tightens a prompt; larger buckets still do.
  • With a calibration cell, the bounded short-prompt recovery is skipped: idle at nominal posture the floor already
    admits such a prompt, and a recovery sample could only raise the estimate. Before the first cell it still runs.

Kill switch: DARKBLOOM_TTFT_NATIVE_PREFILL_EVIDENCE=0 (or DARKBLOOM_TTFT_ADMISSION_FIXES=0) restores the previous
estimator; forwarded to the launchd provider job (LaunchAgent.inferencePassthroughEnvKeys).

Known limits (documented): off nominal posture a short sample still cannot lower the estimate, so the first long
prompt after a posture change is priced from the nominal estimate until it is measured; a MiMo Mac that only sees short
prompts now runs its maintenance calibration as a Mac without traffic does (idle, evidence older than 90 s).

Evidence (production, read-only, 11-13; earnings/glm-deadline-evidence/)

  • OpenRouter's Tau2 run on GLM (01:28-01:35Z): 1,300 of 1,452 requests deadline_unreachable, priced at 85 tok/s
    (44 s projected for 3,772 tokens against 12.6 s left) on idle Macs.

  • Since 07:00Z: GLM Macs 5 and 7 published 9-17 tok/s; Mac 5's estimate moved only when it served 13- and 20-token
    prompts; Mac 7's decayed 57 -> 9 one step a minute from ~10-token prompts. 773 profiled idle GLM refusals used
    9/13/42 tok/s (p10/p50/p90) for prompts of p50 23,466 tokens with 36 s left. OpenRouter GLM 07:00-08:43Z: 8,538
    requests, 200 served (2.3 %); 1,910 had an idle-Mac deadline refusal.

  • Served idle GLM requests above 4K tokens: 1,370-2,047 tok/s (p10-p50, admission to first token).

  • Replay of the SDK's admission on every profiled bounded refusal since 07:00Z (replay.py, replay-0849-busy.txt;
    "in time" judged at the p10 effective rate of served requests of the same size and idleness). Point estimate with the
    estimate at the calibration anchor (GLM 1,400; MiMo M3U 450, M5U 1,100), and with it at a long-prompt rate (GLM
    2,050; MiMo M3U 520), which the busy pricing can reach after long prompts (review r2 m1):

    Model / chip Idle refusals → admitted (late risk) Busy → admitted (late risk), at the anchor Busy, at a long-prompt rate
    GLM M5 Ultra 882 of 883 (0) 94 of 5,510 (1) 157 (22)
    MiMo M3 Ultra 14 of 240 (2); 47 (32) at 520 146 of 1,585 (6) 195 (46)
    MiMo M5 Ultra 8 of 9 (3) 0 of 196 0

    "Late risk" is judged at the served p10, so it is pessimistic; the busy MiMo M3 exposure is the one dev already has
    on a Mac that serves no tiny prompts. Post-release watch: admitted-but-missed-deadline rate on MiMo M3 Ultras
    (rollback =0 per Mac). MiMo's idle refusals are mostly long prompts its M3 Ultras cannot read in time, and its larger
    loss is capacity.

Tests

  • Red on dev (ade8e37afc, compiling at 2a19c4d5ec; CI run 43397961459): tinyPromptCannotPriceTheTau2FirstTurn,
    tinyPromptsEveryMinuteDoNotDecayTheEstimate, busyMacUsesLongPromptEvidence, shortBucketDoesNotTightenNativePrompts
    and mimoMaintenanceRateHolds fail on their rate assertions; the guards ordinaryEnginesUnchanged and
    freshLongPromptEvidenceIsTrusted pass. (The run's only other failure,
    ProviderLifecycleTests.shutdownWaitsForAppAttestWorkerRetirement, is a known timing flake on an untouched path.)
  • Green: those, plus shortPromptRaisesButNeverLowers (published aggregate, observed_prefill_tps
    and bucket), noFloorOffNominalPosture, otherNativeBlockEnginesUnchanged (Diffusion Gemma),
    oldSlowLongPromptGivesWayToTheFloor, lateSampleKeepsTheNewestDate, comparableBucketStillTightens,
    calibratedNativeMacSkipsRecovery, raisingShortSampleDoesNotDateTheEvidence, fasterShortSamplesBlendAfterAGap,
    uncalibratedNativeMacStillRecovers, longPromptRestartsThePublishedRate,
    uncalibratedNativeMacRestartsOnItsOwnClock, uncalibratedRestartKeepsTheBucket,
    switchesRestoreTodaysEstimator, switchParsingAndPassthrough, nativeRatePolicy (23 tests).
  • CI: green on 16a87fdaeb (run 43402756133) and on 75e33517cb (run 43405708625: build, both unit shards).
    Head 1542c6357e (review r3/r4 fixes): local Mac A run of the committed, clean tree — 248 tests in 21 suites pass
    (NativePrefillEvidence 23, PrefillEvidenceRecovery, AdmissionRateEstimator, EngineV2PrefillSampling,
    LaunchAgent, ModelCalibration, StartupPerformanceEvidence, QueueStallSlotState, DeadlineRateEpoch); CI
    green on 1542c6357e
    (run 43409064772: build, both unit shards).

Review

  • r1 (fresh context, earnings/review-2072.md, on an unpushed fix): request changes. All findings addressed in
    09e9a1ddce: B1 (test compile), B2 and M1 (gate narrowed to GLM/MiMo; ModelCalibrationTests pass), M2 (busy replay
    above), m1 (recovery skipped when anchored), m3 (only the smallest bucket skipped), m5 (only calibration and long
    prompts date the evidence), m6 (short samples out of observed_prefill_tps too), n1 (wording, stamps); m2 and m4 are
    documented limits.
  • r2 (fresh context, earnings/review-2072-r2.md, on 16a87fdaeb): approve with nits once CI is green (it is).
    Fixed in 75e33517cb: m2 (only counted samples restart the estimate; a faster short sample blends), m3 (the
    published aggregate restarts with the estimate; docs: contended samples feed observed_prefill_tps as before), m4
    (three tests + the bucket boundary), n1 (wording), n2 (the build log records HEAD and a dirty flag); m1 is the
    sensitivity row and the MiMo M3 watch item above.
  • r3 (earnings/review-2072-r3.md, on 75e33517cb): approve with nits. Fixed in 1d0d16b0fe: m-b (before
    the first calibration cell a native bridge restarts on the published measurement's own clock, as on dev, so an
    uncalibrated Mac's recovery replaces a low estimate), m-c (test pins the published restart), m-a (documented), n-a.
  • r4 (earnings/review-2072-r4.md, on 1d0d16b0fe): approve with nits plus one recommended one-token fix (m-1:
    a pre-cell restart must not force the prompt-size bucket), applied with its test in 1542c6357e, with n-1..n-4.
  • r5 confirmation of 1d0d16b0fe..1542c6357e (earnings/review-2072-r5.md): approve.
  • Fold head: 2072@1542c6357e (CI green, r5 approve).

Fold: at 1542c6357e pairwise clean with every 0.10.13 fold-list PR, #2060, #2061, #2069, #2070, #2071 and the
resolution heads #2062/#2059/#2076 (earnings/glm-deadline-evidence/matrix-2072-1542c6357e.md). Coordinator companion
for the Stage 7 update: darkbloom-platform #934.

Idle GLM-5.3-Flash Macs refused 1,300 of the 1,452 requests of OpenRouter's
Tau2 run as deadline_unreachable: their isolated prefill estimate came from
13-20-token prompts (9-140 tok/s, the request's fixed cost), against
1,378-2,031 tok/s measured on prompts above 4K tokens. Native engines have
no calibrated floor and their recovery admits only short prompts, so the
estimate never recovers.

These tests fail on dev: a tiny prompt's sample prices the 3,772-token first
turn at 13 tok/s and the engine refuses it; a tiny prompt every minute walks
the estimate down; a busy Mac and the short prompt-size bucket price from
short samples; a tiny prompt between MiMo maintenance cells drags 450 tok/s
to 317. Ordinary engines and fresh long-prompt evidence keep their pricing.

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

vercel Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
d-inference-landing Ready Ready Preview Nov 13, 2026 10:27am UTC
darkbloom-status Ready Ready Preview Nov 13, 2026 10:27am UTC
eigen-homepages-darkbloom Ready Ready Preview Nov 13, 2026 10:27am UTC

Request Review

…compiles)

The first red commit did not compile (FirstContentDeadline takes Int64
milliseconds). Same tests; they now build and fail on dev for the reasons
given in ade8e37.

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

GLM-5.3-Flash and native MiMo V2.6 bridges priced every prompt's prefill
from one isolated EWMA fed by every cold idle prompt whatever its size, with
no calibrated floor and no refusal-streak probe; their recovery admits only
prompts of up to 1,024 tokens. A few-token prompt reads 9-140 tok/s (its
fixed cost), so idle Macs refused nearly every longer prompt and never
measured one.

NativePrefillEvidence, GLM-5.3-Flash and native MiMo bridges only (other
native block engines such as Diffusion Gemma, and every ordinary engine,
keep today's estimator), on by default:
- a cold sample from a prompt of at most 4,096 tokens raises the estimate
  when it is faster and is otherwise left out of it, and out of the
  published isolated and observed prefill rates; its prompt-size bucket
  keeps it;
- calibration cells and longer prompts move the estimate either way and
  alone date the evidence; 120 s after the newest, the next sample restarts
  the estimate;
- an idle Mac at nominal posture whose evidence is older than 120 s is
  priced at no less than its calibration cell; fresh evidence, a busy Mac or
  another posture keep the 1/8-anchor floor; old evidence never skips the
  projection;
- the smallest prompt-size bucket (up to 1,024 tokens) no longer tightens a
  prompt; larger buckets still do;
- with a calibration cell the bounded short-prompt recovery is skipped: the
  floor admits such a prompt.

DARKBLOOM_TTFT_NATIVE_PREFILL_EVIDENCE=0 (or DARKBLOOM_TTFT_ADMISSION_FIXES=0)
restores the previous estimator; the key reaches the launchd provider job.
Docs: inference, hardware support, configuration, CLI reference; changelog
fragment.

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

The row moves up one line, beside the corrections switch it extends, so it no
longer shares an insertion point with the rows other 0.10.13 PRs add after
DARKBLOOM_TTFT_REFUSAL_PROBE (a docs-only fold conflict). Text unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fill estimate (review r2)

After an evidence gap a faster short sample restarted the native estimate to
its own value without dating the evidence, so until the next counted sample
the estimate was the fastest short sample seen (review r2 m2). It now blends
in (0.3 x + 0.7 old), which can only raise the estimate; only a calibration
cell or a prompt above 4,096 tokens restarts it, and the published isolated
aggregate restarts with it (m3).

Tests (review r2 m4): a faster short prompt raises the estimate but does not
date it, so an idle Mac keeps its calibration floor; faster short prompts
after a gap blend; before its first calibration cell a GLM Mac still
recovers, and a slower short sample retires the recovery unmeasured (its
backoff); the bucketTightens boundary (1,024 / 1,025).

Wording (n1, m3): recovery is skipped only once calibrated; contended samples
feed observed_prefill_tps as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308 and others added 2 commits November 13, 2026 02:12
…stimate on the published clock (review r3)

r3 m-b: since 75e3351 a faster short sample after a gap blended into the
native estimate everywhere, so on a GLM or MiMo bridge without a calibration
cell a recovery at 400 tok/s lifted an estimate seeded at 9 to 126, not 400,
and the climb took several recoveries. Without an anchor there is no idle
floor, so restarts again follow the published measurement's own 120-second
clock, as on dev; with a cell, only counted samples restart the estimate.

r3 m-c and m-a: a test pins that a long prompt after a gap restarts the
published isolated rate with the estimate, and states that a faster short
sample after a gap restarts the published rate on its own clock while the
estimate blends it in (documented). n-a: wording.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e the prompt-size bucket (review r4)

r4 m-1: before the first cell a faster short sample after a gap restarts the
native estimate on the published clock, and restartEstimate (native &&
resetIsolated) then also forced its prompt-size bucket to restart, dropping
a fresh slower reading that should still tighten a prompt of that size
(Tau2 3,772 tokens: 2,500 instead of 1,450). Force the restart only on the
native clock (nativeClock && resetIsolated): before the first cell the
aggregate and the posture-qualified rate restart on their own identical
clock anyway, and the bucket keeps its own. After the first cell nothing
changes. Test: uncalibratedRestartKeepsTheBucket. Nits n-1..n-4: wording.

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

This branch was successfully deployed

3 active deployments
Preview – d-inference-landing — 1542c635 Deployed Nov 13, 2026 by vercel[bot]
Preview – eigen-homepages-darkbloom — 1542c635 Deployed Nov 13, 2026 by vercel[bot]
Preview – darkbloom-status — 1542c635 Deployed Nov 13, 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.

1 participant