Skip to content

feat(serving): retention verdict on the governed host-cache lease (#287) - #2112

Merged
joelteply merged 1 commit into
canaryfrom
feat/lease-retention-verdict-287
Aug 2, 2026
Merged

joelteply merged 1 commit into
canaryfrom
feat/lease-retention-verdict-287

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

The missing arithmetic behind BigMama's GPU-first K3 thrash (resident=0, evict-everything, zero cross-token reuse while the lease looked healthy): the lease law answers how much RAM is safe to grant but not whether that grant buys anything.

Two pure fns on host_cache_lease: per-token expert working set from the artifact's own geometry (expert_bytes_total / experts_per_layer × top_k — layer count cancels under uniform K3-class geometry; top_k now read from the GGUF's expert_used_count into MoeServingContext), and fixed-point retention_tokens_x100 (100 = GO/NO-GO). The daemon's lease publish probes both every tick and fires a loud serving.moe_host_cache_retention when the budget retains less than one token's set.

Tests: capacity 108/108 (retention identity + thrash verdict + dense no-wrap pinned).

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…he cache says whether it retains even ONE token's expert set (#287)

BigMama's GPU-first K3 run exposed the missing arithmetic: the lease law
answers 'how much RAM is safe to grant' but not 'does that grant BUY
anything'. K3 routes top-16 of 896 across 92 MoE layers; when the lease is
below one token's expert working set, every token evicts the previous
token's experts before reuse — resident=0, evict-everything, zero
cross-token hits — while the lease looks perfectly healthy.

The verdict is two pure fns on the lease module: per-token expert working
set from the artifact's own geometry (expert_bytes_total / experts-per-layer
x top_k — the layer count cancels under uniform K3-class geometry; top_k now
read from the GGUF's expert_used_count into MoeServingContext), and a
fixed-point retention_tokens_x100 (100 = the GO/NO-GO line). The daemon's
lease publish probes both on every tick and emits a loud
serving.moe_host_cache_retention line when the published budget retains
less than one token's set — the honest thrash verdict, surfaced where the
operator and (later) the governor's own policy can act on it.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit 725a17c into canary Aug 2, 2026
3 of 4 checks passed
@joelteply
joelteply deleted the feat/lease-retention-verdict-287 branch August 2, 2026 16:36
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