Repository navigation
feat(resources): embed lane reserves a standing VRAM floor; serving budgets around it (#225) - #2188
Merged
Merged
Conversation
…budgets around it — the parts figure it out (#225) Joel's ruling (2026-08-08): "At worst it ought to turn to paging, or the budgeter just has all its parts figure it out." Measured the same day: the serving window grew to fill the board, leaving 604 MiB governed-available against the embedder's 1792 MiB per-call need — 113 refusals in 25 min, embedding fully dead, every recall degraded to no-relevance. The refusal message said "tier down serving and retry" but nothing ever told serving. The negotiation was already BUILT and never wired: the ledger has per-consumer reservation floors, `available_for` (global available minus every OTHER consumer's unmet floor), and enforcement in `acquire` — with zero production callers. Three wires close the loop: 1. RESOLVE → FLOOR: when the neural embedder resolves (this node embeds), it reserves EMBED_LANE_VRAM_BYTES on the board (`embed.vram.reserved` probe). A node with no embed model wastes nothing. The two constants move to module-level pub in llamacpp_adapter — ONE source for the per-call lease and the floor. 2. SERVING BUDGETS FROM ITS OWN VIEW: `governed_vram_ceiling` now returns `available_for("serving", Vram)` — the same math `acquire` enforces — instead of the reservation-blind global number, so the plan can no longer size the window into a slice it would then be refused. The None-when-no-Vram-row semantics ("governor hasn't reported" ≠ "zero free") are untouched. `available_for` exposed on governor + daemon. 3. ONE bounded retry (2s) on a per-call lease refusal — with the floor in place a refusal means transient over-commit, and relief lands within a governor tick. Second refusal stays the honest loud failure. One retry, never a loop. Regression test: serving_budget_plans_around_other_consumers_floors — floor shrinks serving's plannable view by exactly the slice; serving's own floor never counts against itself; board-row None semantics preserved. cargo check green; new test + resources 137/137. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
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.
Per Joel's ruling ('the budgeter just has all its parts figure it out'): the reservation-floor machinery existed with zero production callers. Now: embedder resolve claims its 1792MiB floor → serving's plan budget reads
available_for("serving")(net of others' floors, same math acquire enforces) → one bounded retry bridges transients. Regression test included; resources 137/137.🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo