Files
Strata/engine/include
Niko1221 87a2efcbc7 feat(inkling2): hot-expert policy of the Qwen engine's adaptive tier, as pure host code with a test
InkExpertPolicy (strata/core/ink_expert_policy.hpp) keeps a usage count per expert (every routed expert adds 1; the looped middle layers run
three times per token, so their experts count up to three times), and a round swaps the hottest experts that are not in the card with the
coldest ones that are: usage floor, minimum gain, a cap on swaps per round, pinned experts, decay. It only plans; the caller moves the bytes.
Settings follow phaseA-tests/rel0221/inkplace/sweep2_v1.py on routing traces of real chats (no pinned share, decay 0.95, gain 1.0, 16 swaps
per round of 4 tokens: hit rate 0.65 / 0.82 / 0.89 / 0.94 at 2 / 4 / 6 / 8 GB of experts, against 0.32 / 0.50 / 0.67 / 0.81 for a static fill
with a 256 MiB ring). Test: ink_expert_policy_test.
2026-11-23 16:03:49 +01:00
..