Skip to content

Account for native context buffers in their allocation pools - #157

Merged
joelteply merged 2 commits into
fable/kv-stream-blocksfrom
codex/context-buffer-accounting
Nov 19, 2026
Merged

joelteply merged 2 commits into
fable/kv-stream-blocksfrom
codex/context-buffer-accounting

Conversation

@joelteply

Copy link
Copy Markdown

Expose the context, compute and output buffer byte totals by their allocator on an allocated or no-alloc context. The embedder uses the same pooled geometry for admission and execution. The accessor excludes model weights, which the resource board already accounts for.

On BigMama, Qwen3-Embedding-0.6B Q8_0 projected CPU bytes matched allocated CPU bytes at widths 256, 512, 1024 and 2048. At 2048 the CUDA projection was 352370816 device bytes and 16838688 host bytes. The projection took 6.41 ms. The previous Metal-derived reservation charged 1495269376 device bytes. The integrated core was built and deployed locally before this commit. The 900-second resident comparison started at 06:21:15 UTC.

@joelteply
joelteply merged commit 126b9c1 into fable/kv-stream-blocks Nov 19, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant