Repository navigation
GLM and MiMo: a short prompt's speed no longer refuses long prompts (DARKBLOOM_TTFT_NATIVE_PREFILL_EVIDENCE) - #2072
Merged
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…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>
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 arefusal 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, whichre-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 deadlineprofile, and
isGLM5NextManaged || nativeTransactionID != nil). Diffusion Gemma's native block engine and everyordinary engine keep today's estimator.
left out of it (a short prompt's rate bounds a longer prompt's from below). It also stays out of
observed_prefill_tpsand the publishedisolated_prefillmeasurement; its prompt-size bucket keeps it.(
nativeRateEvidenceAt) and alone restart the estimate 120 s after the newest; a faster short sample blends in. Thepublished isolated aggregate restarts with the estimate.
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).
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(orDARKBLOOM_TTFT_ADMISSION_FIXES=0) restores the previousestimator; 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):
"Late risk" is judged at the served p10, so it is pessimistic; the busy MiMo M3 exposure is the one
devalready hason a Mac that serves no tiny prompts. Post-release watch: admitted-but-missed-deadline rate on MiMo M3 Ultras
(rollback
=0per Mac). MiMo's idle refusals are mostly long prompts its M3 Ultras cannot read in time, and its largerloss is capacity.
Tests
dev(ade8e37afc, compiling at2a19c4d5ec; CI run 43397961459):tinyPromptCannotPriceTheTau2FirstTurn,tinyPromptsEveryMinuteDoNotDecayTheEstimate,busyMacUsesLongPromptEvidence,shortBucketDoesNotTightenNativePromptsand
mimoMaintenanceRateHoldsfail on their rate assertions; the guardsordinaryEnginesUnchangedandfreshLongPromptEvidenceIsTrustedpass. (The run's only other failure,ProviderLifecycleTests.shutdownWaitsForAppAttestWorkerRetirement, is a known timing flake on an untouched path.)shortPromptRaisesButNeverLowers(published aggregate,observed_prefill_tpsand bucket),
noFloorOffNominalPosture,otherNativeBlockEnginesUnchanged(Diffusion Gemma),oldSlowLongPromptGivesWayToTheFloor,lateSampleKeepsTheNewestDate,comparableBucketStillTightens,calibratedNativeMacSkipsRecovery,raisingShortSampleDoesNotDateTheEvidence,fasterShortSamplesBlendAfterAGap,uncalibratedNativeMacStillRecovers,longPromptRestartsThePublishedRate,uncalibratedNativeMacRestartsOnItsOwnClock,uncalibratedRestartKeepsTheBucket,switchesRestoreTodaysEstimator,switchParsingAndPassthrough,nativeRatePolicy(23 tests).16a87fdaeb(run 43402756133) and on75e33517cb(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(
NativePrefillEvidence23,PrefillEvidenceRecovery,AdmissionRateEstimator,EngineV2PrefillSampling,LaunchAgent,ModelCalibration,StartupPerformanceEvidence,QueueStallSlotState,DeadlineRateEpoch); CIgreen on
1542c6357e(run 43409064772: build, both unit shards).Review
earnings/review-2072.md, on an unpushed fix): request changes. All findings addressed in09e9a1ddce: B1 (test compile), B2 and M1 (gate narrowed to GLM/MiMo;ModelCalibrationTestspass), M2 (busy replayabove), 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_tpstoo), n1 (wording, stamps); m2 and m4 aredocumented limits.
earnings/review-2072-r2.md, on16a87fdaeb): 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 (thepublished aggregate restarts with the estimate; docs: contended samples feed
observed_prefill_tpsas 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.
earnings/review-2072-r3.md, on75e33517cb): approve with nits. Fixed in1d0d16b0fe: m-b (beforethe 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.
earnings/review-2072-r4.md, on1d0d16b0fe): 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.1d0d16b0fe..1542c6357e(earnings/review-2072-r5.md): approve.2072@1542c6357e(CI green, r5 approve).Fold: at
1542c6357epairwise clean with every 0.10.13 fold-list PR, #2060, #2061, #2069, #2070, #2071 and theresolution heads #2062/#2059/#2076 (
earnings/glm-deadline-evidence/matrix-2072-1542c6357e.md). Coordinator companionfor the Stage 7 update: darkbloom-platform #934.