Skip to content

feat(capacity): port the learned-decay bandit — EmaScoreboard + DecayBandit (#276 slice 2) - #2068

Merged
joelteply merged 1 commit into
canaryfrom
feat/expert-decay-bandit-port
Aug 1, 2026
Merged

joelteply merged 1 commit into
canaryfrom
feat/expert-decay-bandit-port

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Faithful port of BigMama's RL prototypes (her branch c687dcd13, docs/architecture/prototypes/expert-pager/) into continuum-core: EmaScoreboard (per-expert EMA at a fixed decay, top-B residency prediction) + DecayBandit (her exact arm ladder, reward = realized per-token hit fraction EMA'd at α=0.3, serve from argmax arm).

Reproduction before improvement: her deterministic synthetic non-stationary workload (verbatim, same LCG seed) pins the measured property — the online bandit matches-or-beats the best fixed decay (her live result: 49.8% vs 47.8%) with the phases genuinely separating the arms. Capture projections (chosen_decay, per_arm_reward) bound to the PagerCaptureEvent fields.

Next slice: OnlineBanditTierPolicy (TierPolicy impl #2 → ExpertTierPlan) + the GGML_MOE_PLAN_FILE atomic control-file writer that drives her C++ ResidencyCache (seam contract locked with her on #general).

Staged only explicit paths (per the #2066 lesson).

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…Bandit (#276 slice 2)

Faithful port of BigMama's expert-pager RL prototypes (predictor.rs +
online_predictor.rs from her branch c687dcd): per-expert EMA
activation score with decay as the recency<->frequency dial, resident
set = top-B by score, and the online layer running her exact arm ladder
[0.0, 0.3, 0.6, 0.85, 0.95, 0.99] as a bandit — every arm rewarded with
its realized per-token hit fraction (EMA alpha 0.3), serving from the
argmax arm. Constants and reward math preserved verbatim; her measured
numbers (+5pts held-out, 49.8 vs 47.8 non-stationary) are properties of
exactly this code.

Reproduction test replays her deterministic synthetic non-stationary
workload (recency-walk phase -> fixed-hot-pool frequency phase, same
LCG seed) and pins THE measured property: the online bandit
matches-or-beats the best fixed decay, with the phases genuinely
separating the arms. Plus the scoreboard ranking contract (with the
honest decay-0 tie caveat) and the PagerCaptureEvent projection
bindings (chosen_decay in-ladder, per_arm_reward one-per-arm in [0,1]).

Next slice: OnlineBanditTierPolicy wiring (TierPolicy impl #2 emitting
ExpertTierPlan) + the GGML_MOE_PLAN_FILE control-file writer driving
her C++ ResidencyCache.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit 5cc130e into canary Aug 1, 2026
3 of 4 checks passed
@joelteply
joelteply deleted the feat/expert-decay-bandit-port branch August 1, 2026 04:34
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