SIGN IN SIGN UP

fix(native-mtp): restore-aware depth gates

Live matched-contract A/B on Qwen 4D native (thinking off, LRU prompt,
temp 0): cold run 1 = 40.2 t/s, warm run 3 = 17.4 t/s. The engine log
names the mechanism: "adaptive depth D3 -> D1 after cycles=129
acceptance[d2=0.574]" - a restored-prefix request starts with a COLD
MTP head cache (backbone hiddens are not stored in the prefix cache),
the first gate windows measure a context-starved head instead of the
bundle, the demotion fires on that transient, and the lowered ceiling
makes it permanent for the request.

On restored-prefix requests: stretch every demotion sample window 4x
(warmup, d2/d3 depth gates, AR-fallback, runtime cost gate) so warm
cycles dilute the cold window before any gate may fire, and keep the
depth ceiling on demote so the adaptive raise path can climb back once
the head cache is warm. Fresh requests keep the exact old behavior.
J
Jinho Jang committed
f303064fabbb87eec99eb26889fc017984a60975
Parent: 71b43b7