pub enum DsparkVtPolicy {
Ladder,
Confidence {
tau: f32,
},
ConfidenceSlot {
tau: f32,
},
}Expand description
Verify-window policy for the dspark round (H4, DSPARK-POSTMORTEM-20260820.md §3).
B2 measured the structural fork: the fixed full-block window (vt=8) buys 95–100%
of the sglang accept bank but LOSES wall speed to the reactive ladder everywhere
except math — at 0.2–0.5 slot rates, full-block verify pays 5–6 empty rows per
round. The confidence policy is the mechanism both leading engines schedule with
(sglang v0.5.16 dspark_planner.py cumprod survival; vLLM #47808): size EACH
round’s window from the drafter’s own trained accept-rate head, so windows open
on confident streaks (math/code) and shrink on bursty text without a 4-round
ladder climb.
Variants§
Ladder
The shipped reactive ladder: vt = (m+2).clamp(3, vt_cap) per round
(MEMRA_DFLASH_ADAPT=0 pins vt at vt_cap = the fixed-window arm).
Confidence
MEMRA_DSPARK_VT=confidence: per-round window from cumprod survival of the
confidence head’s sigmoid scores, thresholded at tau
(MEMRA_DSPARK_VT_TAU, default 0.5). Raw sigmoid — no STS sidecar
calibration exists for this export; the postmortem names this the starting
policy.
ConfidenceSlot
MEMRA_DSPARK_VT=confidence-slot (owner directive, 2026-08-20: “take only
high confidence offers”): submit only the longest draft PREFIX whose every
slot clears tau on its own sigmoid — the low-confidence tail never enters
verify. Same tau env. vs Confidence: if the head’s per-row score is the
MARGINAL accept probability (it already sinks with depth), cumprod survival
double-counts the decay and over-truncates; if it is the CONDITIONAL,
per-slot under-truncates. Which statistic the q38 head emits is empirical —
both arms ride the A/B.
Implementations§
Source§impl DsparkVtPolicy
impl DsparkVtPolicy
Sourcepub fn resolve(has_confidence_head: bool) -> Self
pub fn resolve(has_confidence_head: bool) -> Self
The served resolution: explicit MEMRA_DSPARK_VT={ladder|confidence| confidence-slot} wins (unknown values REFUSE loudly — a typo silently
reverting the window policy would invalidate an A/B without a trace); UNSET
defaults to confidence-slot at τ = MEMRA_DSPARK_VT_TAU (default 0.5) —
the owner-ratified H4 flip (2026-08-20; cell 2’s 4-arm A/B ×5 + cell 3’s tau
ladder put the knee at τ=.5 for the slot arm: 94–98% of the fixed-8 accept bank
at wall ≥ the reactive ladder, exactness 11/11 ALL EXACT). Census-keyed per the
capacity-keyed-defaults law: a checkpoint WITHOUT an accept-rate head has no
signal to schedule with, so unset-env resolves to the ladder there (loudly, at
load) instead of panicking on a default; MEMRA_DFLASH_ADAPT=0 (an explicit
fixed-window request) also keeps the ladder-family arm.
pub fn resolve_value( vt: Option<&str>, tau: Option<&str>, adapt: Option<&str>, has_confidence_head: bool, ) -> Self
Sourcepub fn from_env_value(
vt: Option<&str>,
tau: Option<&str>,
adapt: Option<&str>,
) -> Self
pub fn from_env_value( vt: Option<&str>, tau: Option<&str>, adapt: Option<&str>, ) -> Self
ENV-ONLY parser (no head census): unset = Ladder. Kept for the explicit-value
path of Self::resolve_value and the policy-gate tests; round arms resolve
through Self::resolve so the default stays head-census-keyed.
Sourcepub fn is_confidence(&self) -> bool
pub fn is_confidence(&self) -> bool
True for every head-scheduled arm (the loops gate the head requirement and the embedding stash on this).
Trait Implementations§
Source§impl Clone for DsparkVtPolicy
impl Clone for DsparkVtPolicy
Source§fn clone(&self) -> DsparkVtPolicy
fn clone(&self) -> DsparkVtPolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more