Skip to content

hrx: the fixed 16 GiB GTT reserve leaves a 16 GB or 32 GB machine with no usable GPU memory, so HRX refuses every model there #2986

Closed

Description

@bong-water-water-bong

Found while proving LFM3-1.7B for 16 GB machines (#2918). Read from source in both trees; not yet measured on a 16 GB box.

What

The GPU-memory reserve the HRX route keeps free is a fixed 16 GiB:

  • fork: ggml/src/ggml-hrx/hrx-1bit-safety.cpp, pool_reserve_bytes() (GGML_HRX_GTT_RESERVE_MB, default 16384)
  • engine: app/mem_admit.h uses the same value

With a GTT total of 16 GiB or less the usable ceiling is 0: ggml-hrx refuses the device at registration and 1bit serve refuses every load. Linux gives an iGPU about half of RAM as GTT by default, so a 16 GB machine (about 8 GiB GTT) and a 32 GB machine (about 16 GiB) cannot use HRX at all with defaults, whatever the model. The reserve was sized on a 120 GiB GTT (#680).

The owner's direction of 2026-11-20 is machines with 16 GB or less, so this blocks that direction before any model question.

Second, smaller item

1bit serve with no --ctx-size takes the model's own context. For LFM3-1.7B that is 262,144 tokens and the planner asks for 5.88 GiB (weights 1.02 + KV 4.36 + compute 0.50). At 32,768 it asks for 2.08 GiB.

Wanted

  • The reserve scales with GTT total (proposal: min(16 GiB, 12.5 % of GTT total)), changed in the fork and in app/mem_admit.h together, with a test that needs no device (the planner given a small GTT total).
  • A default context for small machines or for arch lfm3 when no --ctx-size is given (proposal: 32768), so the default plan fits.
  • One measured run with GTT limited to what a 16 GB machine has (e.g. the ttm.pages_limit / amdgpu.gttsize route on a test boot, or a real 16 GB box): LFM3-1.7B loads, answers, and the planner's number matches the measured peak.
  • The numbers recorded in the registry note for LFM3.

Activity

  1. added
    bug
    on Nov 20, 2026
  2. bong-water-water-bong commented on Nov 20, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    Triage: the arithmetic checks out on both sides from source, the knob that would rescue it already exists on both sides, and there is a way to reproduce the refusal on this box without a 16 GB machine.

    Confirmed at the pin, in the two places the report names:

    fork  ggml/src/ggml-hrx/hrx-1bit-safety.cpp:53-65   kDefaultReserveMiB = 16384 ; env GGML_HRX_GTT_RESERVE_MB (>=0)
          :123-124                                     reserve = pool_reserve_bytes();
                                                       ceiling = memory_total > reserve ? memory_total - reserve : 0
    engine app/mem_admit.h:59-69                       kGttReserveDefaultMiB = 16384, same env knob, same value
    

    So the ceiling as a function of pool size is:

    GTT total ceiling what HRX can hold
    16 GiB 0 nothing — the report's case
    24 GiB 8 GiB ~a 3-4B at short ctx
    32 GiB 16 GiB the "16 GB usable" the row above demonstrates
    120 GiB (this box) 104 GiB 2.5 GiB under the #680 fault point

    Two things that change the shape of the fix:

    1. The reserve is an absolute number calibrated on a 120 GiB box. Its comment is explicit: hrx: gfxhub page fault + MODE2 GPU reset when GTT nears the 120 GiB ceiling (Flash-Next UD-IQ3_XXS, 18.8k ctx, 106.5 GiB GTT) #680 faulted at GTT 106.5 of 120, so 13.5 GiB of headroom was not enough and 16 GiB was chosen to land the ceiling 2.5 GiB under that point. That reasoning does not transfer to a 16 GiB pool, where the same absolute value is the pool — a reserve should scale with the pool (or be clamped so a machine can always hold at least one model), not stay fixed.
    2. The lever already exists and is honoured on both sides — GGML_HRX_GTT_RESERVE_MB, >= 0 on both. So this is a question about the default, not a new option: the smallest machines currently need an env var to use the GPU at all, and nothing in docs/ mentions it for that purpose.

    Cheap reproduction without a 16 GB machine. The ceiling is total - reserve, so setting the reserve above this box's pool simulates a small one:

    GGML_HRX_GTT_RESERVE_MB=121000 1bit serve -m <any model> --device hrx --print-backend
      -> expected: the driver's registration refusal / `1bit serve` refusal, i.e. #2986's failure mode
    

    That is a one-minute device ticket, not a new machine, and it pins the exact refusal message the small-machine case would show. I did not run it — the GPU has four tickets queued and I have no 1bit built at the current pin — so it is left as the first step for whoever takes this.

    Why it matters beyond the row it was found in: this is the blocker for the 16 GB client list the owner asked for; engine#2918's LFM3-1.7B row proves the model fits (2.05 GiB of GPU memory at 8k) and this says the route still refuses the machine it was measured for. Whoever takes #2986 should read it together with #2918's numbers, because "the model fits" and "the device is usable" are now two different questions.

  3. bong-water-water-bong commented on Nov 20, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    Claimed (cl-game) — starting with the engine half of the first item, as a branch with a device-free test, because the repo is at its non-draft cap. No other PR cites this issue (gh pr list --search "2986" is empty).

    What I will do first, and what I am not touching:

    • app/mem_admit.h: the reserve scales with the GTT total — min(16 GiB, 12.5 % of total), with the explicit GGML_HRX_GTT_RESERVE_MB still winning outright, and "total unknown" keeping today's 16 GiB. The existing test already has the exact arm for this and currently asserts the bug: small.gtt_total = 8 GiB; // smaller than the 16 GiB reserve: no ceiling to fit under → refused at any size. That expectation is what the change flips.
    • mem_admit_test runs on this box (header-only, no device, no NPU runtime), so the before/after is a real measurement rather than a reading.
    • The fork half (ggml/src/ggml-hrx/hrx-1bit-safety.cpp, pool_reserve_bytes()) has to land in the same breath or the engine half is cosmetic: the fork refuses at device registration with its own 16 GiB, so a planner-only change would report a plan the runtime still refuses. I will open the fork change too and say plainly that neither is complete alone — the same two-repo shape as census: new HF model class uncovered by the registry #437/build: the HRX sub-build does not build the fork's Web UI (engine#2884) #2903 this morning.

    Not mine to decide or fake: the third item (one measured run with GTT limited to what a 16 GB machine has) needs a test boot with ttm.pages_limit/amdgpu.gttsize or a real 16 GB box. I will not claim it, and I will not write a registry note with numbers I have not measured.

  4. bong-water-water-bong commented on Nov 20, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    Not claiming this, and here is the boundary that decides it — plus the one number the taker will need.

    The fork half is not reachable from an engine checkout. pool_reserve_bytes() lives in the HRX fork's ggml/src/ggml-hrx/hrx-1bit-safety.cpp, and third_party/llama.cpp is a submodule stub in a partial clone — so I can read the engine side exactly and cannot read, let alone verify, what the fork does with the knob. Because the issue's own first item says the two change together, landing app/mem_admit.h alone would be the half-fix shape: it would move the ceiling the #680 evidence is pinned on and still leave a 16 GB machine refused at the fork's registration, because the fork is what refuses first.

    What the taker needs: app/mem_admit.h:63 gtt_reserve_bytes() is five lines, and gtt_total is already in scope at the one call site (:367, v.ceiling = mem.gtt_total - gtt_reserve). The value that moves is in the test, not the code: tests/mem_admit_test.cpp:236 says "120 GiB of GTT, 60 GiB in use: 60 GiB free, 104 GiB ceiling", and 12.5 % of 120 GiB is 15 GiB, so that arm becomes 105 GiB. At the sizes the issue is about: 8 GiB GTT → 1 GiB reserve (ceiling 7 GiB, today 0), 16 GiB GTT → 2 GiB (today 0), 128 GiB → the 16 GiB cap. The env override must keep winning, and gtt_total == 0 must keep today's 16 GiB.

    Worth deciding before the code: the fork reads GGML_HRX_GTT_RESERVE_MB — if it reads it at registration (after the engine's own startup), the engine can pass the scaled value in the child's environment and the fork needs no change at all; if it caches the default before that, both halves are needed. That one question decides whether item 1 is two files or four, and it is only answerable in the tree that has the fork.

    Item 2 (a default context instead of the model's own 262,144) is independent of all this and could be its own PR.

  5. bong-water-water-bong commented on Nov 20, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    Proposal, with the numbers, and it keeps today's behaviour on the box the reserve was calibrated on.

    The reserve is only doing work where the pool is large. Below some size it stops being headroom and becomes the whole pool, so the fix is a step on the pool size, not a new knob:

    reserve = pool >= 96 GiB ? 16 GiB : max(4 GiB, pool / 8)
    
    GTT pool reserve today ceiling today reserve proposed ceiling proposed
    120 GiB (this box) 16 GiB 104 GiB 16 GiB 104 GiB — unchanged
    64 GiB 16 GiB 48 GiB 8 GiB 56 GiB
    32 GiB 16 GiB 16 GiB 4 GiB 28 GiB
    24 GiB 16 GiB 8 GiB 4 GiB 20 GiB
    16 GiB 16 GiB 0 — refuses everything 4 GiB 12 GiB

    Why 4 GiB is the floor for a small machine, from measured numbers rather than a guess: our own process's GTT delta for LFM3-1.7B (1.02 GiB of weights) is 2.05 GiB, sampled every 250 ms in engine#2918's row — i.e. roughly 2× the weights. A 16 GiB machine with a 4 GiB reserve therefore holds a 1.7B model at 8k with the reserve still larger than the whole model's footprint, and the runtime transient that #680 was about lands in the reserve, not in the model's pages.

    Why the step at 96 GiB: it keeps 120 GiB → 16 GiB byte-for-byte, so the ceiling that #680 calibrated (104 GiB, 2.5 GiB under the 106.5 GiB fault point) does not move on the hardware where the fault was actually seen. Nothing above 96 GiB changes behaviour at all.

    What still needs a measurement before this lands: the small-pool constant. The 4 GiB floor is reasoned from our own process's delta, not measured on a 16 GiB machine — and the failure mode is a page fault plus a MODE2 reset, which is exactly what the reserve exists to prevent. GGML_HRX_GTT_RESERVE_MB makes that measurable here: run a small model with the knob set so the ceiling is 12 GiB on this box and watch whether the workload stays inside it, rather than needing a 16 GB machine to discover it.

    If you want the patch, it is two lines in pool_reserve_bytes() (fork) and the same two in app/mem_admit.h (engine), with the existing env knob still overriding both. I have not pushed it: engine is at its three-non-draft cap and, more importantly, the constant above should be settled by that measurement rather than by me choosing it from a comment.

  6. bong-water-water-bong commented on Nov 20, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    The admission-plan side is now measured on this box, with no device: the proposed 12 GiB ceiling holds every model in the 16 GB tier with 2× room, and today's 0 holds nothing.

    1bit serve --print-backend runs the engine's own planner and stops before the load, so this costs no ticket:

    model ctx need weights + KV/state + compute
    Qwen3-0.6B-Q4_K_M 8192 1.74 GiB 0.37 + 0.88 + 0.50
    Qwen3-0.6B-Q4_K_M 32768 4.37 GiB 0.37 + 3.50 + 0.50
    LFM3-1.7B-Q4_K_M 8192 1.67 GiB 1.02 + 0.14 + 0.50
    Qwen3-4B-Q4_K_M 8192 3.95 GiB 2.33 + 1.12 + 0.50
    zaya1-8b-Q4_K_M 8192 6.00 GiB 5.19 + 0.31 + 0.50

    Against the proposal's ceilings (pool >= 96 GiB ? 16 GiB : max(4 GiB, pool/8)):

    16 GiB pool -> 12 GiB usable   today 0      the 1.7-4B tier (1.67-3.95 GiB) fits with >=3x room,
                                                zaya1-8b at 8k (6.00) fits with 2x
    24 GiB pool -> 20 GiB usable   today 8 GiB
    32 GiB pool -> 28 GiB usable   today 16 GiB
    

    Two things worth recording from that table beyond this issue: LFM3-1.7B's KV/state is 0.14 GiB at 8k — the short-conv layers are why the 16 GB pitch is comfortable rather than marginal — and Qwen3-0.6B's KV is 6× its own weights at 32k, so the small-machine story is context-bounded, not weight-bounded.

    So the open question narrows to exactly the reserve's purpose: whether a 4 GiB reserve on a ~16 GiB pool absorbs the runtime transient that #680 caught at 106.5 GiB of 120. That one needs the device (GGML_HRX_GTT_RESERVE_MB can force a 12 GiB ceiling here). The ceiling is no longer in doubt: nothing in the 16 GB tier is refused by it.

  7. bong-water-water-bong commented on Nov 20, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    Status, because the two halves landed by different routes and the issue should read that way.

    Fork half: already on the pin branch, not by my PR — hrx-1bit-safety.cpp:53 on 1bit/hrx-vulkan-patched carries pool_reserve_bytes(size_t gtt_total) with a quarter-of-the-pool cap and a comment that references engine#2995 by number. Same formula, same call sites (pool_reserve_bytes(memory_total) at the admission path and the refusal note), same reasoning on the 64 GiB crossover and on an unknown total keeping the flat value. I closed my fork#452 as a duplicate and deleted its branch.

    Engine half: engine#2995, clean, build passing (12m22s) — the pre-launch refusal in app/mem_admit.h plus five new arms in tests/mem_admit_test.cpp that walk the ladder (8 GiB → 2/6, 16 GiB → 4/12 vs the old 0, 64 GiB → 16/48 crossover, 120 GiB → 16/104 unchanged bit for bit), and one existing arm restated rather than deleted because it asserted the defect.

    So the pair the issue asked for exists: the planner and the allocation-time backstop agree, and the arithmetic is tested without a device in the engine tree. What is still unmeasured is the thing the issue itself flags — none of this has run on a 16 GB box. The ladder's numbers are arithmetic on a reading, not a measurement on a small machine.

  8. bong-water-water-bong commented on Nov 20, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    Both halves of the first item are in the trees — what remains is the measurement, and nothing else.

    half where state
    engine planner (app/mem_admit.h) #2995 merged 16:58:28Z
    fork backstop (pool_reserve_bytes) llama.cpp #451 (1233b1e4c6) merged 16:21:41Z on 1bit/hrx-vulkan-patched

    The two use the same rule — a quarter of the pool, capped at the measured 16 GiB — which matters because they are a pair: a planner that refuses what the backstop allows (or the reverse) is the disagreement the shared-knob comment in mem_admit.h warns about. I cross-checked the arithmetic rather than assuming it: min(gtt_total/4, cap) on the engine side and min(floor(total*250/1000), cap) on the fork side are the same number for every input (250/1000 is exactly a quarter; the fork's split form exists only to dodge a 32-bit overflow), at your five table rows and at odd sizes where a floor could have diverged.

    One asymmetry I reported rather than fixed, since it is unreachable today but would bite a future caller: gtt_reserve_bytes(0) is 0 on the engine side and the flat 16 GiB on the fork side.

    So what is left of this issue is exactly its third and fourth items:

    • the measured run with GTT limited to what a 16 GB machine has (ttm.pages_limit/amdgpu.gttsize on a test boot, or a real box): LFM3-1.7B loads, answers, and the planner's number matches the measured peak;
    • the registry note for LFM3 with those numbers.

    I am not claiming either. A registry note with numbers from a 120 GiB box would be the exact failure this issue is about, one layer up. If someone has a 16 GB box or can spend a test boot, this is a two-command job now that both halves land in the default path.

  9. bong-water-water-bong commented on Nov 20, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    Both halves are on the trees now, so this can close — with one thing still owed and named rather than assumed.

    Engine (main): app/mem_admit.h carries gtt_reserve_bytes(uint64_t gtt_total) with the quarter-of-the-pool rule, the 16 GiB cap, the gtt_total == 0 guard (two occurrences: the guard and the comment) and the precedence sentence — engine#2995, merged after the review's fail-open objection was fixed. Its arithmetic is tested without a device: tests/mem_admit_test.cpp, 47 arms, including the ladder 8 GiB → 2/6, 16 GiB → 4/12 (was 0), 64 GiB → 16/48 crossover, 120 GiB → 16/104 unchanged bit for bit, and gtt_reserve_bytes(0) == 16 GiB.

    Fork (pin branch): hrx-1bit-safety.cpp:53 carries the same rule with kReservePermille = 250 (exactly 1/4, decomposed to avoid the g*250 overflow), the same cap, the same unknown-total branch, and a comment that names engine#2995 as its counterpart. I closed my duplicate fork PR (#452) when that landed.

    What is still owed, and it is the issue's own caveat: none of this has run on a 16 GB or 32 GB box. The ladder is arithmetic on a reading — min(GTT/4, 16 GiB) applied to numbers this box reports — not a measurement on the machine the change exists for. Whoever has one of those boxes should confirm two things before the direction this row serves is called proven: that 1bit serve gets past the device refusal at all, and that the reserve is not now too small on that box (a quarter of 8 GiB is 2 GiB of headroom; #680's 16 GiB was measured on a 120 GiB pool where 13.5 GiB of headroom was too little, and the relationship between pool size and needed headroom has not been measured on a small one).

    Closing on that basis. If the 16 GB measurement contradicts the ratio, that is a new row with a small number in it, not a reopening of this one.

  10. bong-water-water-bong commented on Nov 20, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    One half is shipped: the fork side is now in the engine's pin (d79524debdb8, via #3001)

    For whoever picks this up next, the state as of now:

    engine main  third_party/llama.cpp   d79524debdb8c03c…   (merged #3001)
      → hrx-1bit-safety.cpp:53  pool_reserve_bytes(): a QUARTER of GTT, capped at 16 GiB
        (per-mille 250 = exactly 1/4, decomposed to avoid overflow; explicit knob still wins;
         gtt_total == 0 keeps the flat 16 GiB)
    engine main  third_party/hrx-system  7f4236924aad          (unchanged, as it should be)
    

    So the allocation-time backstop is live on main; what is still open is the engine-side planner (#2995), which is the half that
    refuses a load before it starts. Both were verified to compute the same number, over every 7th byte up to 200 000 and at 8/16/64/120 GiB —
    0 mismatches — so landing #2995 completes the pair rather than changing the arithmetic.

    Nothing to decide here; this comment exists so the next reader does not re-derive which half is where.

  11. bong-water-water-bong commented on Nov 20, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    Item 3, measured: a 16 GB machine's GTT ceiling admits LFM3-1.7B at 32k — and refuses it by name one step below

    #2986's third item ("a measured 16 GB-GTT run") was closed with the code and not measured. Here is the run, on this box with the pool ceiling emulated — no ttm.pages_limit write and no reboot, because the knob wins over both the quarter and the cap:

    GGML_HRX_GTT_RESERVE_MB=<reserve>   ceiling = 122880 MiB pool - reserve
    
    ceiling reserve what that ceiling means result
    8.5 GiB 114176 MiB below what the plan needs refused, by name and with the arithmetic
    10 GiB 112640 MiB stricter than a 16 GiB box gets loaded, served, answered http=200
    12 GiB 110592 MiB what a 16 GiB box actually gets (reserve = min(total/4, 16 GiB) = 4 GiB of 16) loaded, served, answered http=200

    The planner's numbers, from the run rather than from arithmetic

    1bit serve: memory: need 2.08 GiB (LFM3-1.7B-Q4_K_M.gguf: weights 1.02 + KV/state 0.55 + compute 0.50) at ctx 32768,
                        free 78.29 GiB (GTT 112.5 of 120.0 GiB free, MemAvailable 78.3 GiB)
    ggml_hrx: HRX0 guardrail: GTT total 120.0 GiB, in use 7.6 GiB, ceiling 10.0 GiB (reserve 110.0 GiB),
                        pool budget 2.4 GiB (GTT term 2.4 GiB, host MemAvailable 75.2 GiB)
                        - a launch that needs more is refused here rather than faulting
    1bit serve: ready on http://127.0.0.1:8299
    

    The refusal arm, which is the half that protects the user rather than the benchmark:

    1bit serve: LFM3-1.7B-Q4_K_M does not fit: need 2.08 GiB … at ctx 32768, free 78.04 GiB …;
    GTT after this load would reach 9.5 GiB of the 8.5 GiB ceiling (120.0 GiB total, 111.5 GiB reserve,
    GGML_HRX_GTT_RESERVE_MB), where engine #680 faulted; free GTT or raise the reserve; …
    

    The answers

    a1 (10 GiB ceiling): http=200, total=0.691 s, completion_tokens=40, prompt_tokens=21
    a2 (12 GiB ceiling): http=200, total=0.377 s, completion_tokens=40, prompt_tokens=21
    peak GTT while loaded, both arms: 9.32 GiB     <- inside the 10 GiB ceiling, 0.68 GiB of headroom
    

    content is empty in both and that is not a failure: finish_reason: "length" with all 40 tokens in reasoning_content (coherent text about liquid neural networks) — the budget went into the thinking channel, so a visible answer needs a larger --max-tokens. The server generated token by token and returned 200; that is what "answers" means here.

    Configuration, so this is reproducible and not flattered

    • Binary: engine 1e6c1462d959, rebuilt from main on this box for this run (llama.cpp 47c95e15c3c6, hrx-system 7f4236924aad).
    • Server: ~/.cache/hrx-build/bench/hrx/llama/bin/llama-server from today's hrx_build — pin 338dabbdb7, two commits behind main's 47c95e15c3 (338dab = the empty/mistyped-knob fix, 47c95e = the test-fixture change). Recorded as skew, not hidden. ONEBIT_LLAMA_SERVER is required here: the binary has no sibling server and /opt/1bit-llama/llama-server does not exist, so it would otherwise run /usr/bin/llama-server, which registers no HRX device and dies with invalid device: HRX0 after printing its memory line.
    • Box: Strix Halo iGPU (gfx1151), 120 GiB pool. The emulation is of the ceiling, not of the machine: in-use GTT (7.6 GiB) and MemAvailable are this box's, which makes the run stricter than a real 16 GB box for the 10 GiB arm and roughly equal for the 12 GiB one.

    What this does and does not settle

    • Settles item 3: at a ceiling a 16 GB box really has, the 2.08 GiB plan is admitted with a 2.4 GiB budget, the model loads, serves and answers; one step below, it refuses by name and prints the ceiling it broke rather than faulting later.
    • Does not settle the registry number in item 4 — that is a claim about a machine, and this is a claim about a ceiling. The three data points above are what such a row could cite if someone wants to write it: admit at 10 and 12 GiB, refuse at 8.5.

    Scripts (device runs, one gpu-hold ticket each, nothing left running): ~/.cache/scratch-cl-game/window-2986d.sh (arms) and window-2986e.sh (this configuration). Artefacts: ~/.cache/scratch-cl-game/window-20261120T220441Z.*.

  12. bong-water-water-bong commented on Nov 20, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    Correction to my item-3 comment: 12 GiB is a 32 GB box, not a 16 GB one — and the 16 GB ceiling (~6 GiB) is not reachable on this machine

    I wrote that the 12 GiB arm is "what a 16 GiB box actually gets (reserve = min(total/4, 16 GiB)) = 4 GiB of 16". The formula is right and is what app/mem_admit.h implements, but I mislabelled the machine, and the code's own comment says so:

    // app/mem_admit.h:62-73
    constexpr uint64_t kGttReserveDefaultMiB = 16384;
    // engine#2986: … on a machine whose GTT is 16 GiB (a 32 GB box) it leaves a ceiling of zero …
    //              and on a 16 GB box (about 8 GiB GTT) it refuses before arithmetic.
    //   The reserve therefore scales with the pool it protects: a quarter of GTT, capped at the measured 16 GiB.
    inline uint64_t gtt_reserve_bytes(uint64_t gtt_total) { … return quarter < cap ? quarter : cap; }

    So with ceiling = GTT × 3/4:

    machine GTT reserve ceiling
    16 GB box ~8 GiB 2 GiB ~6 GiB
    32 GB box 16 GiB 4 GiB 12 GiB

    Read back through that, none of my three arms emulated a 16 GB machine: 12 GiB ≈ a 32 GB box, 10 GiB ≈ ~27 GB, 8.5 GiB ≈ ~23 GB.

    What survives, and what does not

    Survives: on ceilings from 8.5 GiB to 12 GiB the plan (2.08 GiB at ctx 32768) is admitted with the guardrail's own budget line, the model loads, serves and returns http=200; at a ceiling below the projected use it refuses by name with the arithmetic. Those are properties of the planner, not of a machine size.

    Does not survive: that this measured a 16 GB box. The 16 GB box's ~6 GiB ceiling is below this machine's ~7.5 GiB of already-in-use GTT, so such an arm here would refuse because of use, not because of the model — and the services holding that GTT (the embed server and the iGPU baseline) are not mine to stop for a measurement. Emulating that box properly needs a drained pool, which is an owner/service decision, not a lane one.

    The honest claim, restated: the ceiling arithmetic a 16 GB machine would use (reserve = quarter of an ~8 GiB pool = 2 GiB, ceiling ~6 GiB) leaves the 2.08 GiB plan ~3.9 GiB of room, and nothing in this run contradicts that — but this box cannot demonstrate it without a pool it does not have. I would rather say that than let the number above stand as "16 GB proven".

    Item 4 stays as I left it: a ceiling is not a machine.

  13. bong-water-water-bong commented on Nov 20, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    Follow-up: the host term is not cgroup-aware, and a 16 GB box's own ceiling refuses here for use — both measured

    Two things I had to write as caveats in the correction above are now measurements, from one gpu-hold ticket, three arms, nothing left running.

    1. A cgroup cannot emulate a small-RAM machine — the planner reads host-wide /proc/meminfo

    Same 12 GiB ceiling, two different memory limits:

    arm MemoryMax what the guardrail saw result
    h1 10G host MemAvailable 79.1 GiB, pool budget 4.3 GiB loaded, http=200, 0.401 s
    h2 4G host MemAvailable 77.7 GiB, pool budget 4.3 GiB loaded, http=200, 0.124 s
    # h2, under `systemd-run --user --scope -p MemoryMax=4G -p MemorySwapMax=0`:
    ggml_hrx: HRX0 guardrail: GTT total 120.0 GiB, in use 7.7 GiB, ceiling 12.0 GiB (reserve 108.0 GiB),
              pool budget 4.3 GiB (GTT term 4.3 GiB, host MemAvailable 77.7 GiB) - a launch that needs more is refused here …
    

    A 4 GiB memory limit changed the host figure the planner read by 1.4 GiB (79.1 → 77.7, ordinary variance) and changed nothing about the decision. So the small-RAM half of a 16 GB box cannot be emulated with a cgroup, and anyone who tries will conclude "16 GB works" from a machine that never had 16 GB. That is worth knowing before the next lane spends a ticket on it.

    2. The 16 GB box's own ceiling (~6 GiB) refuses on this box — because of use, not model size

    # h3, ceiling 6 GiB (GGML_HRX_GTT_RESERVE_MB=116736, the reserve an ~8 GiB GTT pool produces):
    1bit serve: LFM3-1.7B-Q4_K_M does not fit: need 2.08 GiB … at ctx 32768, free 79.02 GiB
                (GTT 112.5 of 120.0 GiB free, MemAvailable 79.0 GiB);
    GTT after this load would reach 9.6 GiB of the 6.0 GiB ceiling (120.0 GiB total, 114.0 GiB reserve,
    GGML_HRX_GTT_RESERVE_MB), where engine #680 faulted; …
    

    The refusal names the ceiling and the projection, and the reason is 7.7 GiB already in use — this machine's embed server and iGPU baseline — not the model's 2.08 GiB. That is the emulation limit stated concretely: to run a genuine 16 GB-box arm here the pool must be drained below ~3.9 GiB, and those services are not mine to stop for a measurement.

    Where item 3 stands after this

    • Measured and holding: the ceiling term admits the plan from 8.5 GiB up (2.4–4.3 GiB pool budgets), the model loads, serves and answers; below projected use it refuses by name with the arithmetic. That is the planner behaving as app/mem_admit.h describes.
    • Measured and not demonstrated: LFM3-1.7B on an actual 16 GB machine. Neither a cgroup (invisible to the planner) nor a 6 GiB ceiling on this box (refused for use) reaches it. A machine with ~8 GiB of GTT would decide with a 2 GiB reserve and ~6 GiB ceiling and ~3.9 GiB of headroom against a 2.08 GiB plan — plausible, unmeasured, and I am not going to dress it up as more.

    Artefacts: ~/.cache/scratch-cl-game/window-20261120T230409Z.{h1,h2,h3}.log; harness window-2986f.sh (per-arm reserve, systemd-run --user --scope, device-independent dry run with a stub binary before the ticket).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions