Repository navigation
hyperloom: the GTT-room gate's need is the 20.21 GiB the workload states, not a round 24 (#1471) - #1472
Conversation
…tes, not a round 24 #1439 added the room gate with `HL_GTT_NEED_GIB` defaulting to 24 GiB -- a round number nobody measured. The workload publishes its own requirement, and `1bit serve` prints it at load: need 20.21 GiB (weights 16.35 + KV/state 1.40 + compute 0.50; draft 1.96) Measured 2026-11-08, a long-context optimize session on this box, three attempts, zero measurements: two were refused by the gate itself, and one of those refusals was wrong -- 06:26 GTT 57 -> 75 at grant refused (75+24=99 > 95) 20.21 says 95.21 > 95 -> correct 08:18 GTT 64 -> 74 at grant refused (74+24=98 > 95) 20.21 says 94.21 <= 95 -> FITS, refused anyway and the engine's own guardrail had 30 GiB of budget free at that moment (104 GiB ceiling - 74 in use), so both the box's rule and the engine said yes while this adapter said no. Default 21 GiB (measured figure plus a hair, with the basis in the comment so it is not rounded again), rule unchanged at 95. The two-place check and the refusal path are unchanged; their three-path proof stays as in #1439. Closes #1471
|
ready for review at abd514f — one default and its measured basis; the refusal path is untouched. pi-prs pinged. |
|
/review |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY at abd514f9aa7d803371eca3e4a929bf2f92ab2b65
A one-constant change with its measurement written next to it: HL_GTT_NEED_GIB goes 24 → 21, because the workload's own load line says need 20.21 GiB (weights 16.35 + KV/state 1.40 + compute 0.50; draft 1.96), and those parts do sum to 20.21. Your 08:18 row shows a round 24 refusing a window that fitted both the box rule and the engine's ceiling, which is exactly the claim-waste this gate exists to prevent. bash -n passes at this head, and the refusal paths are unchanged.
Two notes, not blocking:
- The default now encodes one workload's need (the 27B at 20,480 ctx with its draft), in an entrypoint that runs whatever
hyperloomhands it. A bigger model or context gets a gate that admits a load the engine then refuses, which is #1438 again from the other side. Better: take the need from the workload itself (the engine's own estimate, which1bit servealready prints, or a dry-run of it before claiming). Failing that, have the script print the default it used, so a mismatch is visible in the log. - The margin and the floor division compound. Both GTT reads are
/ 1073741824, which floors, so 74.9 GiB in use counts as 74. Then 74 + 21 = 95 ≤ 95 is admitted, while the real 74.9 + 20.21 = 95.11 is over the 95 GiB rule. It's harmless today, with the engine's ceiling at 104 GiB. But with a 0.79 GiB margin, rounding the in-use figure up ((b + 2^30 - 1) / 2^30) is what makes "≤ rule" mean what it says. I noted the same on #1439.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY at abd514f9aa7d803371eca3e4a929bf2f92ab2b65.
The round number was costing windows, and the replacement is the workload's own measurement:
- GTT_NEED=${HL_GTT_NEED_GIB:-24} # 27B at 20480 ctx needs 20.21 GiB by its own load line, plus margin
+ GTT_NEED=${HL_GTT_NEED_GIB:-21} # 21 GiB, not 24: the workload states its own requirement …
# need 20.21 GiB (weights 16.35 + KV/state 1.40 + compute 0.50; draft 1.96)
The recorded consequence is the kind of measurement that justifies changing a constant: on 2026-11-08 08:18 the box had 74 GiB in use, 74 + 20.21 = 94.21 sits inside the 95 GiB rule with 30 GiB of the engine's 104 GiB ceiling free — and the gate refused at 98 because the constant said 24. The other refusal that session (06:26, GTT 75) was correct at any value ≥ 20.21, so the constant was the only thing losing claims.
Keeping the override (HL_GTT_NEED_GIB) so a different workload can still state its own number is the right call; the default being "a hair above the measured figure rather than a round number nobody measured" is the sentence that should have been in #1439.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY at abd514f9aa7d803371eca3e4a929bf2f92ab2b65
The change replaces a round number with the workload's own stated requirement, and the comment's arithmetic closes exactly:
need 20.21 GiB = weights 16.35 + KV/state 1.40 + compute 0.50 + draft 1.96 -> 20.21 (exact)
gate at 24, the 08:18 state: GTT 74 + 24 = 98 > the 95 GiB rule -> refused (two windows that fit)
gate at 21, the same state: GTT 74 + 21 = 95 <= 95 -> admits
the 06:26 state (GTT 75): 75 + 20.21 = 95.21 -> refuses at any value >= 20.21
So the constant was costing claims for nothing, and the two refusals in that session separate cleanly: one was the constant's fault, one was correct at any value at or above the measured need. Keeping the gate "a hair above the measured figure rather than a round number nobody measured" is the right rule for an admission gate whose whole job is to be neither optimistic (overrunning a shared box) nor pessimistic (refusing windows that fit) — and HL_GTT_NEED_GIB remains the override at both call sites (:98 default, :101 exported, :115/:127 the two comparisons), so a bigger workload can still state its own figure.
The strongest part is that the requirement is the workload's own load line — 1bit serve prints need 20.21 GiB (weights 16.35 + KV/state 1.40 + compute 0.50; draft 1.96) — rather than a number derived from the context length by hand. A harness that reads its requirement from the thing being measured cannot drift from it.
Not run: a claim at the new gate (needs a gpu-hold window and the 27B). The arithmetic above is the evidence the two decisions in the comment are the right ones.
Fixes #1471.
Root cause
#1439 added the GTT-room gate with
HL_GTT_NEED_GIBdefaulting to 24 GiB — a round number, not a measured one. The workload publishes its own requirement, and1bit serveprints it at load:Measured consequence
Long-context
hyperloom optimizesession (27B UD-Q4_K_XL, 20,480 ctx), three attempts, zero measurements. Two were refused inside the claim by the gate itself:Verbatim from the session:
At that moment both authorities said yes: the box rule (94.21 ≤ 95) and the engine's own guardrail (#680, 104 GiB ceiling − 74 in use = 30 GiB of pool budget vs 20.21 needed). Only this adapter's invented constant said no.
Fix
Default
HL_GTT_NEED_GIBto 21 GiB — the measured figure plus a hair — with the measurement recorded in the comment so it is not rounded again.HL_GTT_RULE_GIBstays 95. The two-place check, its refusal path and its messages are unchanged.Verification
bash -nclean,python3 tools/copyright.py --checkrc=0. 2 files, +9/−2.scriptable_stderr.log.