Repository navigation
A queued mind waits her turn; an embedding leases what its own context allocates - #5906
Merged
Merged
Conversation
On the M5 (26960c0) a mind queued behind others for room had her turn refused and re-measured every publisher beat: 186 settle.inference_failed an hour, each one a full view render. Queued, reclaiming, and an engine relaunching (Ungranted::awaits_room) now wait for a later evaluation with her demand standing; any other reason still refuses within one cadence, named. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
The embed lane leased a fixed 1,792 MiB (a 2,048-token context) for every call; with 1.5-1.7 GiB free on the M5, 758 of 834 embeddings in 3 h were refused (26960c0), so her recall ran mostly dark. EmbeddingBatch tokenizes first and leases its padded window times the measured per-token cost (engine-c, Qwen3-Embedding-0.6B, linear within 0.1% at 256-2,048 tokens): a short text leases ~182 MiB. The standing floor is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…padding has one owner - The lease's two attempts are explicit: a second refusal carries the availability it measured, never a defaulted 0. - The media path matches its one item instead of unwrapping it; genes and stop sequences flatten an absent list instead of defaulting it; display defaults and the trained-ceiling default say why; the lease TTL says it is a SIGKILL backstop only. - llama pads every context to 256 tokens (GGML_PAD in llama-context.cpp): ContextParams:: allocated_n_ctx in the llama crate is that fact's one owner, where EmbeddingBatch prices it. - The queued-mind test's closure moves the id it captures. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
Contributor
Author
Measured live (M5, 2d9ce06, stacked branch, deployed 10:47:37Z; read 15.5 min)
|
Contributor
Author
|
Not yet verified on CUDA or Windows. |
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 the residents' health (path step 1, fast, and their recall). Two places where a short resource turned into a failure instead of a wait or a fit.
What changes
A queued mind waits her turn (
capacity/mind_window.rs,window_grant.rs)Ungranted::awaits_room) waits for a later evaluation, with her demand standing and her view measured once.An embedding leases what its own context allocates (
backends/llamacpp/embedding_batch.rs,llamacpp_adapter.rs)EmbeddingBatchtokenizes and plans first (it now owns One over-long text never zeroes a whole embedding batch: a text past the model's context is embedded as its in-context windows, combined by token share (card 57ef2a06) #5901's windowing), then leases its widest piece's padded window times the measured per-token cost.llama::ContextParams::allocated_n_ctx, citingGGML_PADinllama-context.cpp.The touched adapter leaves clean
Measured
delib.window.refusedwith "Queued { position: 2, of: 2 }" (Aiko 64, Atlas 61, Benchy 50, Aris 11). Each was asettle.inference_failed, about 10 s apart.embed.vram.refusedwith 1.5–1.7 GiB governed-available.Follow-ups
llama_context_measure) would report it before a context exists.🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo