Repository navigation
The embedder's floor is resident: its whole need stays reserved between embeds, cleared only when it unloads - #6006
Merged
Conversation
…en embeds, cleared only when it unloads The M5 (canary 7f875cc, engine -c 551865, booted ~07:52Z 2026-11-14): after #5996 the embed requests are small (186,908,672 and 373,817,344 B), but by 08:16Z embed.vram.refused = 13 and embedding.neural.failed = 11, all at available=0. #5996's floor fell to the weights between embeds, so the engine's pool and the other claims took the next context's room. EmbedResidency (embed_lane_memory.rs) is the embed lane's resident claim: weights plus one window context (~2.1 GB on the device at most), reserved per pool from the first embed and held by the backend (LlamaCppBackend::embed_residency). It is cleared only in its Drop, when the embedder unloads. Leases are granted inside it and never move it. #5993's room_beside_others counts the reservation, so a boot or a regrowth sizes beside it. The LaneFloors grant/release bookkeeping is deleted. Pinned: an_embed_after_an_idle_gap_is_granted_beside_an_engine_that_fills_the_room, a_refused_request_leaves_the_floor_unchanged, unloading_the_embedder_clears_its_floor. Co-Authored-By: Claude Opus 5.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.
Serves residents' recall under the one memory budget (plan line 3/3b). Follow-up to #5996, from its live receipt.
Receipt (the M5, canary 7f875cc, engine -c 551865 / allocated 551,936, booted ~07:52Z 2026-11-14)
embed.vram.refused0 across 56 leases.embed.vram.refused= 13 andembedding.neural.failed= 11, all small requests at zero room:pool=Vram requested=373817344 available=0andrequested=186908672 available=0.Cause
embed_lane_memory.rson canary (LaneFloors::grant/release): the reservation was weights plus the leases held now. Between embeds it was the weights alone, soroom_beside_others(#5993) andavailable_forhanded the context's room to the engine.Fix, at the owner
EmbedResidency: the embed lane's resident claim, its whole need (weights plus one window context: 639 MB + 1,495 MB on the device at most). It is reserved per pool from the embedder's first embed (the resolver's probe) and held by the backend (LlamaCppBackend::embed_residency, aOnceLock). It is cleared only in itsDrop, when the embedder unloads (nothing holds what it isn't using: an idle embedder that is still loaded is used every turn).EmbedLeaseError::Oversized.room_beside_otherscounts the reservation, so a boot or a regrowth sizes beside it.PoolFloor,LaneFloors, theFLOORSstatic and its grant/release bookkeeping.Pinned tests
an_embed_after_an_idle_gap_is_granted_beside_an_engine_that_fills_the_room: the engine leases every byte the board allows, then an embed, the idle gap, and an embed after it are all granted, up to the widest window. The claim never moves.a_refused_request_leaves_the_floor_unchanged: an oversized request and a capacity refusal both leave the claim as it was.unloading_the_embedder_clears_its_floor: a release keeps the claim; dropping the residency clears it to 0.Not run locally: this machine serves live minds, so CI is the compiler.
Residuals
available_forholds back about 0.6 GB extra beyondphysical_used(unchanged from The embedder holds its need: a window-bounded context, a floor set by grants and lowered by releases #5996).Lines
+128 / −151 across 5 files.
stringly_errorsunchanged.Live check after deploy
In the first hour on the M5:
embed.vram.refused= 0 andembedding.neural.failed= 0, withembed.vram.leasedat or below 1,495,269,376 B.🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo